|
1 | 1 | package dataplane
|
2 | 2 |
|
3 | 3 | import (
|
4 |
| - "fmt" |
5 | 4 | "testing"
|
6 | 5 | "time"
|
7 | 6 |
|
@@ -74,9 +73,6 @@ func TestNetPolInBackgroundUpdatePolicy(t *testing.T) {
|
74 | 73 | calls := append(getBootupTestCalls(), getAddPolicyTestCallsForDP(&testPolicyobj)...)
|
75 | 74 | calls = append(calls, getRemovePolicyTestCallsForDP(&testPolicyobj)...)
|
76 | 75 | calls = append(calls, getAddPolicyTestCallsForDP(&updatedTestPolicyobj)...)
|
77 |
| - for _, call := range calls { |
78 |
| - fmt.Println(call) |
79 |
| - } |
80 | 76 | ioshim := common.NewMockIOShim(calls)
|
81 | 77 | defer ioshim.VerifyCalls(t, calls)
|
82 | 78 | dp, err := NewDataPlane("testnode", ioshim, netpolInBackgroundCfg, nil)
|
@@ -133,31 +129,31 @@ func TestNetPolInBackgroundFailureToAddFirstTime(t *testing.T) {
|
133 | 129 | },
|
134 | 130 | // restore will try twice per pMgr.AddPolicies() call
|
135 | 131 | testutils.TestCmd{
|
136 |
| - Cmd: []string{"iptables-restore", "-w", "60", "-T", "filter", "--noflush"}, |
| 132 | + Cmd: []string{"iptables-nft-restore", "-w", "60", "-T", "filter", "--noflush"}, |
137 | 133 | ExitCode: 1,
|
138 | 134 | },
|
139 | 135 | testutils.TestCmd{
|
140 |
| - Cmd: []string{"iptables-restore", "-w", "60", "-T", "filter", "--noflush"}, |
| 136 | + Cmd: []string{"iptables-nft-restore", "-w", "60", "-T", "filter", "--noflush"}, |
141 | 137 | ExitCode: 1,
|
142 | 138 | },
|
143 | 139 | // first policy succeeds
|
144 | 140 | testutils.TestCmd{
|
145 |
| - Cmd: []string{"iptables-restore", "-w", "60", "-T", "filter", "--noflush"}, |
| 141 | + Cmd: []string{"iptables-nft-restore", "-w", "60", "-T", "filter", "--noflush"}, |
146 | 142 | ExitCode: 0,
|
147 | 143 | },
|
148 | 144 | // second policy succeeds
|
149 | 145 | testutils.TestCmd{
|
150 |
| - Cmd: []string{"iptables-restore", "-w", "60", "-T", "filter", "--noflush"}, |
| 146 | + Cmd: []string{"iptables-nft-restore", "-w", "60", "-T", "filter", "--noflush"}, |
151 | 147 | ExitCode: 0,
|
152 | 148 | },
|
153 | 149 | // third policy fails
|
154 | 150 | // restore will try twice per pMgr.AddPolicies() call
|
155 | 151 | testutils.TestCmd{
|
156 |
| - Cmd: []string{"iptables-restore", "-w", "60", "-T", "filter", "--noflush"}, |
| 152 | + Cmd: []string{"iptables-nft-restore", "-w", "60", "-T", "filter", "--noflush"}, |
157 | 153 | ExitCode: 1,
|
158 | 154 | },
|
159 | 155 | testutils.TestCmd{
|
160 |
| - Cmd: []string{"iptables-restore", "-w", "60", "-T", "filter", "--noflush"}, |
| 156 | + Cmd: []string{"iptables-nft-restore", "-w", "60", "-T", "filter", "--noflush"}, |
161 | 157 | ExitCode: 1,
|
162 | 158 | },
|
163 | 159 | )
|
|
0 commit comments