Skip to content

Commit

Permalink
kola/ torcx removal: address feedback from PR review
Browse files Browse the repository at this point in the history
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
  • Loading branch information
t-lo committed Oct 17, 2023
1 parent 16b5ee1 commit 1a30986
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 29 deletions.
15 changes: 2 additions & 13 deletions kola/tests/sysext/disable_containerd.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
// Copyright 2023 The Flatcar Maintainers.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// SPDX-License-Identifier: Apache-2.0

package sysext

Expand Down Expand Up @@ -51,7 +40,7 @@ storage:
func containerdDisable(c cluster.TestCluster) {
m := c.Machines()[0]
output := c.MustSSH(m,
`test ! -f /usr/bin/containerd || echo "ERROR"`)
`test -f /usr/bin/containerd && echo "ERROR" || true`)
if string(output) == "ERROR" {
c.Errorf("/usr/bin/containerd exists even when sysext is disabled!")
}
Expand Down
15 changes: 2 additions & 13 deletions kola/tests/sysext/disable_docker.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
// Copyright 2023 The Flatcar Maintainers.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// SPDX-License-Identifier: Apache-2.0

package sysext

Expand Down Expand Up @@ -46,7 +35,7 @@ storage:
func dockerDisable(c cluster.TestCluster) {
m := c.Machines()[0]
output := c.MustSSH(m,
`test ! -f /usr/bin/docker || echo "ERROR"`)
`test -f /usr/bin/docker && echo "ERROR" || true`)
if string(output) == "ERROR" {
c.Errorf("/usr/bin/docker exists even when sysext is disabled!")
}
Expand Down
6 changes: 3 additions & 3 deletions kola/tests/systemd/journald.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ storage:
func journalUser(c cluster.TestCluster) {
if err := util.Retry(10, 2*time.Second, func() error {
cmd := "journalctl --user"
log, e := c.SSH(c.Machines()[0], cmd)
if e != nil {
return fmt.Errorf("Did not get expexted log output from '%s': %v", cmd, e)
log, err := c.SSH(c.Machines()[0], cmd)
if err != nil {
return fmt.Errorf("Did not get expexted log output from '%s': %v", cmd, err)
}

if len(log) == 0 {
Expand Down

0 comments on commit 1a30986

Please sign in to comment.