photoprism-client-go/test
Kris Nóva 94dde03103 Adding docs and ready for 1.0.0
Signed-off-by: Kris Nóva <kris@nivenly.com>
2021-02-11 18:04:53 -08:00
..
README.md Adding docs and ready for 1.0.0 2021-02-11 18:04:53 -08:00
album_test.go Working photo and album endpoints with super amazing unit and itnegrations tests - please run my fucking code i dare you 2021-02-11 17:25:03 -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 Adding initial album feature work 2021-02-11 15:32:03 -08:00
photo_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
session_test.go Very nice looking tests! 2021-02-09 16:00:02 -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 TestHappyMethod(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()
    }
}