Skip to content

Commit

Permalink
review fix
Browse files Browse the repository at this point in the history
  • Loading branch information
karol-kokoszka committed Nov 26, 2024
1 parent 21f96ee commit 54c5fd9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pkg/testutils/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ const (

// CmdUnblockScyllaAlternator defines the command used for unblocking the Scylla Alternator access.
CmdUnblockScyllaAlternator = "iptables -D INPUT -p tcp --destination-port 8000 -j DROP"

// CmdOrTrueAppend let to accept shell command failure and proceed

Check failure on line 44 in pkg/testutils/exec.go

View workflow job for this annotation

GitHub Actions / Various checks

Comment should end in a period (godot)
CmdOrTrueAppend = " || true"
)

func makeIPV6Rule(rule string) string {
Expand Down Expand Up @@ -176,7 +179,7 @@ func UnblockREST(t *testing.T, h string) {
func TryUnblockREST(t *testing.T, hosts []string) {
t.Helper()
for _, host := range hosts {
if err := RunIptablesCommand(t, host, CmdUnblockScyllaREST); err != nil {
if err := RunIptablesCommand(t, host, CmdUnblockScyllaREST+CmdOrTrueAppend); err != nil {
t.Log(err)
}
}
Expand Down Expand Up @@ -211,7 +214,7 @@ func UnblockCQL(t *testing.T, h string, sslEnabled bool) {
func TryUnblockCQL(t *testing.T, hosts []string) {
t.Helper()
for _, host := range hosts {
if err := RunIptablesCommand(t, host, CmdUnblockScyllaCQL); err != nil {
if err := RunIptablesCommand(t, host, CmdUnblockScyllaCQL+CmdOrTrueAppend); err != nil {
t.Log(err)
}
}
Expand All @@ -238,7 +241,7 @@ func UnblockAlternator(t *testing.T, h string) {
func TryUnblockAlternator(t *testing.T, hosts []string) {
t.Helper()
for _, host := range hosts {
if err := RunIptablesCommand(t, host, CmdUnblockScyllaAlternator); err != nil {
if err := RunIptablesCommand(t, host, CmdUnblockScyllaAlternator+CmdOrTrueAppend); err != nil {
t.Log(err)
}
}
Expand Down Expand Up @@ -267,7 +270,7 @@ func StartAgent(t *testing.T, h string) {
func TryStartAgent(t *testing.T, hosts []string) {
t.Helper()
for _, host := range hosts {
if err := StartService(host, agentService); err != nil {
if err := StartService(host, agentService+CmdOrTrueAppend); err != nil {
t.Log(err)
}
}
Expand Down

0 comments on commit 54c5fd9

Please sign in to comment.