Skip to content

Commit

Permalink
Bump ubi 9.4 (#41)
Browse files Browse the repository at this point in the history
* Bump ubi 9.4

* use ubi minimal

* e2e test make sure whole path exists

* install tar
  • Loading branch information
jotak committed Aug 1, 2024
1 parent b364a6d commit d4d4c9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ RUN GOARCH=$TARGETARCH make compile
RUN mkdir -p output

# Create final image from ubi + built binary
FROM --platform=$TARGETPLATFORM registry.access.redhat.com/ubi9/ubi:9.3
FROM --platform=$TARGETPLATFORM registry.access.redhat.com/ubi9/ubi-minimal:9.4
RUN microdnf update -y && microdnf install -y tar
WORKDIR /
COPY --from=builder /opt/app-root/build .
COPY --from=builder --chown=65532:65532 /opt/app-root/output /output
USER 65532:65532

ENTRYPOINT ["/network-observability-cli"]
ENTRYPOINT ["/network-observability-cli"]
8 changes: 4 additions & 4 deletions e2e/capture_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ func TestFlowCapture(t *testing.T) {
var jsons []string
var dbs []string

assert.Equal(t, true, outputDirExists())
dirPath := path.Join("output", "flow")
assert.True(t, dirExists(dirPath), "directory %s not found", dirPath)
err := filepath.Walk(dirPath, func(path string, info os.FileInfo, err error) error {
if err != nil {
fmt.Println(err)
Expand Down Expand Up @@ -139,8 +139,8 @@ func TestPacketCapture(t *testing.T) {
func(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context {
var pcaps []string

assert.Equal(t, true, outputDirExists())
dirPath := path.Join("output", "pcap")
assert.True(t, dirExists(dirPath), "directory %s not found", dirPath)
err := filepath.Walk(dirPath, func(path string, info os.FileInfo, err error) error {
if err != nil {
fmt.Println(err)
Expand Down Expand Up @@ -170,8 +170,8 @@ func TestPacketCapture(t *testing.T) {
testCluster.TestEnv().Test(t, f1)
}

func outputDirExists() bool {
if _, err := os.Stat("output"); err != nil {
func dirExists(dir string) bool {
if _, err := os.Stat(dir); err != nil {
if os.IsNotExist(err) {
return false
}
Expand Down

0 comments on commit d4d4c9e

Please sign in to comment.