Skip to content

Commit 391f4b6

Browse files
ShashikanthRaoTvagrant
authored andcommitted
Srt issue1710 remove unused test security vulnerabilities (#320)
* Removed unused docker test * Removed unused docker test * Added comments on a test * Removed unused docker test * Added comments on a test Co-authored-by: vagrant <vagrant@vagrant.vm>
1 parent 05d63e3 commit 391f4b6

File tree

1 file changed

+3
-36
lines changed

1 file changed

+3
-36
lines changed

test/docker/docker_api_test.go

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ func TestLicenseNotSet(t *testing.T) {
5252
expectTerminationMessage(t, cli, id)
5353
}
5454

55+
//Start container with LICENSE environment variable set to view.
56+
//Check that container starts and display license text
5557
func TestLicenseView(t *testing.T) {
5658
t.Parallel()
5759

@@ -132,42 +134,6 @@ func goldenPath(t *testing.T, metric bool) {
132134
stopContainer(t, cli, id)
133135
}
134136

135-
// TestSecurityVulnerabilities checks for any vulnerabilities in the image, as reported
136-
// by Red Hat
137-
func TestSecurityVulnerabilities(t *testing.T) {
138-
t.Parallel()
139-
140-
cli, err := client.NewClientWithOpts(client.FromEnv)
141-
if err != nil {
142-
t.Fatal(err)
143-
}
144-
rc, _ := runContainerOneShot(t, cli, "bash", "-c", "command -v microdnf && test -e /etc/yum.repos.d/ubi.repo")
145-
if rc != 0 {
146-
t.Skip("Skipping test because container is based on ubi-minimal, which doesn't include yum")
147-
}
148-
// id, _, err := command.Run("sudo", "buildah", "from", imageName())
149-
// if err != nil {
150-
// t.Log(id)
151-
// t.Fatal(err)
152-
// }
153-
// id = strings.TrimSpace(id)
154-
// defer command.Run("buildah", "rm", id)
155-
// mnt, _, err := command.Run("sudo", "buildah", "mount", id)
156-
// if err != nil {
157-
// t.Log(mnt)
158-
// t.Fatal(err)
159-
// }
160-
// mnt = strings.TrimSpace(mnt)
161-
// out, _, err := command.Run("bash", "-c", "sudo cp /etc/yum.repos.d/* "+filepath.Join(mnt, "/etc/yum.repos.d/"))
162-
// if err != nil {
163-
// t.Log(out)
164-
// t.Fatal(err)
165-
// }
166-
// out, ret, _ := command.Run("bash", "-c", "yum --installroot="+mnt+" updateinfo list sec | grep /Sec")
167-
// if ret != 1 {
168-
// t.Errorf("Expected no vulnerabilities, found the following:\n%v", out)
169-
// }
170-
}
171137

172138
func utilTestNoQueueManagerName(t *testing.T, hostName string, expectedName string) {
173139
search := "QMNAME(" + expectedName + ")"
@@ -187,6 +153,7 @@ func utilTestNoQueueManagerName(t *testing.T, hostName string, expectedName stri
187153
t.Errorf("Expected result of running dspmq to contain name=%v, got name=%v", search, out)
188154
}
189155
}
156+
190157
func TestNoQueueManagerName(t *testing.T) {
191158
t.Parallel()
192159

0 commit comments

Comments
 (0)