photoprism-client-go/test
Kris Nóva 414bfb6aa1 Fixing found bug in UpdatePhoto UUID->photoUID
Signed-off-by: Kris Nóva <kris@nivenly.com>
2021-02-13 13:20:23 -08:00
..
README.md Update README.md 2021-02-11 18:26:02 -08:00
album_test.go Fixing import for a quick 1.0.1 2021-02-11 20:14:42 -08:00
index_test.go A lot of work with albums and photos, still working but want to save working tests/methods 2021-02-11 17:16:37 -08:00
main_test.go Fixing import for a quick 1.0.1 2021-02-11 20:14:42 -08:00
photo_test.go Fixing found bug in UpdatePhoto UUID->photoUID 2021-02-13 13:20:23 -08:00
session_test.go Fixing import for a quick 1.0.1 2021-02-11 20:14:42 -08:00

README.md

Local Integration Tests

To run the tests.

sudo -E go test . -v

Adding a test

To add a test please try to have both Happy and Sad tests defined for all new SDK methods.

Example test:

mymethod_test.go
 
// TestHappyMethod will test my new method
func TestHappyMethod(t *testing.T) {
    params := "my good input"
    _, err := Client.V1().Method(params)
	if err != nil {
		t.Errorf("expected success running method: %v", err)
		t.FailNow()
	}
}

// TestSadMethod will false positive test my new method
func TestSadMethod(t *testing.T) {
    params := "my bad input"
    _, err := Client.V1().Method(params)
    if err == nil {
        t.Errorf("expected failure running method: %v", err)
        t.FailNow()
    }
}