Skip to content

Commit

Permalink
New integ test (#124)
Browse files Browse the repository at this point in the history
* add first integ test

* correct build tag
  • Loading branch information
hopkiw authored Sep 8, 2021
1 parent ee9760d commit 720e031
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions google_guest_agent/non_windows_accounts_integ_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// +build integration

package main

import (
"os/exec"
"testing"
)

func TestGroupaddDuplicates(t *testing.T) {
cmd := exec.Command("groupadd", "integ-test-group")
ret := runCmdOutput(cmd)
if ret.ExitCode() != 0 {
t.Fatalf("got wrong exit code running \"groupadd integ-test-group\", expected 0 got %v\n", ret.ExitCode())
}
cmd = exec.Command("groupadd", "integ-test-group")
ret = runCmdOutput(cmd)
if ret.ExitCode() != 9 {
t.Fatalf("got wrong exit code running \"groupadd integ-test-group\", expected 9 got %v\n", ret.ExitCode())
}
}

0 comments on commit 720e031

Please sign in to comment.