Skip to content

Commit

Permalink
Removed references to testify package (ansible#837)
Browse files Browse the repository at this point in the history
  • Loading branch information
thom-at-redhat authored and AaronH88 committed Oct 5, 2023
1 parent 631d12a commit 5e4caa0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: CI

on:
pull_request:
on: # yamllint disable-line rule:truthy
pull_request: # yamllint disable-line rule:empty-values

jobs:
lint-receptor:
Expand All @@ -29,6 +29,8 @@ jobs:

- name: Setup up python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install tox
run: pip install tox
Expand Down Expand Up @@ -149,6 +151,8 @@ jobs:

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install python dependencies
run: pip install build
Expand Down
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ require (
github.com/quic-go/quic-go v0.34.0
github.com/rogpeppe/go-internal v1.10.0
github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8
github.com/stretchr/testify v1.8.1
github.com/vishvananda/netlink v1.1.0
golang.org/x/net v0.9.0
gopkg.in/yaml.v2 v2.4.0
Expand Down Expand Up @@ -51,7 +50,6 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/onsi/ginkgo/v2 v2.9.4 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/quic-go/qtls-go1-19 v0.3.2 // indirect
github.com/quic-go/qtls-go1-20 v0.2.2 // indirect
github.com/spf13/pflag v1.0.5 // indirect
Expand Down
27 changes: 19 additions & 8 deletions pkg/controlsvc/reload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package controlsvc

import (
"testing"

"github.com/stretchr/testify/assert"
)

func TestReload(t *testing.T) {
Expand All @@ -22,22 +20,35 @@ func TestReload(t *testing.T) {
{filename: "reload_test_yml/successful_reload.yml", modifyError: false, absentError: false},
}
err := parseConfigForReload("reload_test_yml/init.yml", false)
assert.NoError(t, err)
assert.Len(t, cfgNotReloadable, 5)
if err != nil {
t.Errorf("parseConfigForReload %s: Unexpected err: %v", "init.yml", err)
}

if len(cfgNotReloadable) != 5 {
t.Errorf("cfNotReloadable length expected %d, got %d", 5, len(cfgNotReloadable))
}

for _, s := range scenarios {
t.Logf("%s", s.filename)
err = parseConfigForReload(s.filename, true)
if s.modifyError {
assert.Error(t, err)
if err == nil {
t.Errorf("parseConfigForReload %s %s: Expected err, got %v", s.filename, "modifyError", err)
}
} else {
assert.NoError(t, err)
if err != nil {
t.Errorf("parseConfigForReload %s %s: Unexpected err: %v", s.filename, "modifyError", err)
}
}
err = cfgAbsent()
if s.absentError {
assert.Error(t, err)
if err == nil {
t.Errorf("parseConfigForReload %s %s: Expected err, got %v", s.filename, "absentError", err)
}
} else {
assert.NoError(t, err)
if err != nil {
t.Errorf("parseConfigForReload %s %s: Unexpected err: %v", s.filename, "absentError", err)
}
}
}
}

0 comments on commit 5e4caa0

Please sign in to comment.