Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed references to testify package #837

Merged
merged 4 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: ${{ matrix.python-version }}
thom-at-redhat marked this conversation as resolved.
Show resolved Hide resolved

- 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: ${{ matrix.python-version }}

- 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)
thom-at-redhat marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
}
Loading