github.com/qri-io/qri@v0.10.1-0.20220104210721-c771715036cb/config/automation_test.go (about) 1 package config 2 3 import ( 4 "testing" 5 ) 6 7 func TestAutomationValidate(t *testing.T) { 8 err := DefaultAutomation().Validate() 9 if err != nil { 10 t.Errorf("error validating default api: %s", err) 11 } 12 } 13 14 func TestAutomationCopy(t *testing.T) { 15 a := DefaultAutomation() 16 b := a.Copy() 17 18 a.Enabled = !a.Enabled 19 a.RunStoreMaxSize = "foo" 20 21 if a.Enabled == b.Enabled { 22 t.Errorf("Enabled fields should not match") 23 } 24 if a.RunStoreMaxSize == b.RunStoreMaxSize { 25 t.Errorf("RunStoreMaxSize fields should not match") 26 } 27 }