Skip to content

Commit

Permalink
fix(pkg/build): fixed flaky test.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
  • Loading branch information
FedeDP authored and poiana committed Oct 11, 2023
1 parent 30dc660 commit 4ae897b
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions pkg/build/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
},
Expand All @@ -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{
Expand All @@ -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",
},
},
Expand All @@ -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{
Expand All @@ -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",
},
},
Expand All @@ -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{
Expand All @@ -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",
},
},
Expand All @@ -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",
},
}

Expand Down

0 comments on commit 4ae897b

Please sign in to comment.