From 4ae897bcf7701f0a47f513e3655f5bda1ea2f4bf Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Wed, 11 Oct 2023 17:08:58 +0200 Subject: [PATCH] fix(pkg/build): fixed flaky test. Signed-off-by: Federico Di Pierro --- pkg/build/build_test.go | 62 ++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/pkg/build/build_test.go b/pkg/build/build_test.go index c8307a1..2b19fbb 100644 --- a/pkg/build/build_test.go +++ b/pkg/build/build_test.go @@ -40,7 +40,7 @@ func TestBuild(t *testing.T) { RepoRoot: "./test", Target: root.Target{ Distro: "centos", - KernelRelease: "5.14.0-362.el9.x86_64", + KernelRelease: "5.14.0-366.el9.x86_64", KernelVersion: "1", }, }, @@ -49,15 +49,15 @@ func TestBuild(t *testing.T) { IgnoreErrors: false, }, expectedLocalObjects: []string{ - "falco_centos_5.14.0-362.el9.x86_64_1.ko", - "falco_centos_5.14.0-362.el9.x86_64_1.o", + "falco_centos_5.14.0-366.el9.x86_64_1.ko", + "falco_centos_5.14.0-366.el9.x86_64_1.o", }, expectedBucketObjects: []string{ - "falco_centos_5.14.0-362.el9.x86_64_1.ko", - "falco_centos_5.14.0-362.el9.x86_64_1.o", + "falco_centos_5.14.0-366.el9.x86_64_1.ko", + "falco_centos_5.14.0-366.el9.x86_64_1.o", }, shouldCreate: true, - name: "build 5.0.1+driver centos 5.14.0-362.el9.x86_64", + name: "build 5.0.1+driver centos 5.14.0-366.el9.x86_64", }, { opts: Options{ @@ -68,7 +68,7 @@ func TestBuild(t *testing.T) { RepoRoot: "./test", Target: root.Target{ Distro: "centos", - KernelRelease: "5.14.0-364.el9.x86_64", + KernelRelease: "5.14.0-368.el9.x86_64", KernelVersion: "1", }, }, @@ -77,17 +77,17 @@ func TestBuild(t *testing.T) { IgnoreErrors: false, }, expectedLocalObjects: []string{ - "falco_centos_5.14.0-364.el9.x86_64_1.ko", - "falco_centos_5.14.0-364.el9.x86_64_1.o", - "falco_centos_5.14.0-362.el9.x86_64_1.ko", - "falco_centos_5.14.0-362.el9.x86_64_1.o", + "falco_centos_5.14.0-368.el9.x86_64_1.ko", + "falco_centos_5.14.0-368.el9.x86_64_1.o", + "falco_centos_5.14.0-366.el9.x86_64_1.ko", + "falco_centos_5.14.0-366.el9.x86_64_1.o", }, expectedBucketObjects: []string{ - "falco_centos_5.14.0-362.el9.x86_64_1.ko", - "falco_centos_5.14.0-362.el9.x86_64_1.o", + "falco_centos_5.14.0-366.el9.x86_64_1.ko", + "falco_centos_5.14.0-366.el9.x86_64_1.o", }, shouldCreate: false, // since it is not publishing - name: "build 5.0.1+driver centos 5.14.0-364.el9.x86_64", + name: "build 5.0.1+driver centos 5.14.0-368.el9.x86_64", }, { opts: Options{ @@ -98,7 +98,7 @@ func TestBuild(t *testing.T) { RepoRoot: "./test", Target: root.Target{ Distro: "centos", - KernelRelease: "5.14.0-362.el9.x86_64", // try to rebuild same object. + KernelRelease: "5.14.0-366.el9.x86_64", // try to rebuild same object. KernelVersion: "1", }, }, @@ -107,17 +107,17 @@ func TestBuild(t *testing.T) { IgnoreErrors: false, }, expectedLocalObjects: []string{ - "falco_centos_5.14.0-364.el9.x86_64_1.ko", - "falco_centos_5.14.0-364.el9.x86_64_1.o", - "falco_centos_5.14.0-362.el9.x86_64_1.ko", - "falco_centos_5.14.0-362.el9.x86_64_1.o", + "falco_centos_5.14.0-368.el9.x86_64_1.ko", + "falco_centos_5.14.0-368.el9.x86_64_1.o", + "falco_centos_5.14.0-366.el9.x86_64_1.ko", + "falco_centos_5.14.0-366.el9.x86_64_1.o", }, expectedBucketObjects: []string{ - "falco_centos_5.14.0-362.el9.x86_64_1.ko", - "falco_centos_5.14.0-362.el9.x86_64_1.o", + "falco_centos_5.14.0-366.el9.x86_64_1.ko", + "falco_centos_5.14.0-366.el9.x86_64_1.o", }, shouldCreate: false, // since objects are already present, nothing should be created - name: "rebuild 5.0.1+driver centos 5.14.0-362.el9.x86_64", + name: "rebuild 5.0.1+driver centos 5.14.0-366.el9.x86_64", }, { opts: Options{ @@ -128,7 +128,7 @@ func TestBuild(t *testing.T) { RepoRoot: "./test", Target: root.Target{ Distro: "centos", - KernelRelease: "5.14.0-362.el9.x86_64", // try to rebuild same object. + KernelRelease: "5.14.0-366.el9.x86_64", // try to rebuild same object. KernelVersion: "1", }, }, @@ -137,17 +137,17 @@ func TestBuild(t *testing.T) { IgnoreErrors: false, }, expectedLocalObjects: []string{ - "falco_centos_5.14.0-364.el9.x86_64_1.ko", - "falco_centos_5.14.0-364.el9.x86_64_1.o", - "falco_centos_5.14.0-362.el9.x86_64_1.ko", - "falco_centos_5.14.0-362.el9.x86_64_1.o", + "falco_centos_5.14.0-368.el9.x86_64_1.ko", + "falco_centos_5.14.0-368.el9.x86_64_1.o", + "falco_centos_5.14.0-366.el9.x86_64_1.ko", + "falco_centos_5.14.0-366.el9.x86_64_1.o", }, expectedBucketObjects: []string{ - "falco_centos_5.14.0-362.el9.x86_64_1.ko", - "falco_centos_5.14.0-362.el9.x86_64_1.o", + "falco_centos_5.14.0-366.el9.x86_64_1.ko", + "falco_centos_5.14.0-366.el9.x86_64_1.o", }, - shouldCreate: true, // since objects are already present, nothing should be created - name: "rebuild 5.0.1+driver centos 5.14.0-362.el9.x86_64", + shouldCreate: true, + name: "rebuild and publish 5.0.1+driver centos 5.14.0-366.el9.x86_64", }, }