38 lines
566 B
Go
Executable File
38 lines
566 B
Go
Executable File
package monitor
|
|
|
|
import (
|
|
"local/sandbox/arlo-cleaner/config"
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func TestArloClean(t *testing.T) {
|
|
if _, ok := os.LookupEnv("INTEGRATION"); !ok {
|
|
t.Log("$INTEGRATION not set")
|
|
return
|
|
}
|
|
was := os.Args
|
|
defer func() {
|
|
os.Args = was
|
|
}()
|
|
os.Args = []string{
|
|
"foo",
|
|
"-arlouser",
|
|
"squeaky2x3@gmail.com",
|
|
"-arlopass",
|
|
"LetMe!23In",
|
|
"-arlomb",
|
|
"20",
|
|
}
|
|
if err := config.Refresh(); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
arlo, err := NewArlo()
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if err := arlo.Clean(); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|