From febce4f2e3a86da4171783fcc593b25a807c3da8 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sat, 25 Aug 2018 11:53:14 -0700 Subject: Split integration tests into multiple files --- tests/import_export_test.go | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tests/import_export_test.go (limited to 'tests/import_export_test.go') diff --git a/tests/import_export_test.go b/tests/import_export_test.go new file mode 100644 index 0000000..6011475 --- /dev/null +++ b/tests/import_export_test.go @@ -0,0 +1,46 @@ +// Copyright 2018 Frédéric Guillot. All rights reserved. +// Use of this source code is governed by the Apache 2.0 +// license that can be found in the LICENSE file. + +// +build integration + +package tests + +import ( + "bytes" + "io/ioutil" + "strings" + "testing" +) + +func TestExport(t *testing.T) { + client := createClient(t) + + output, err := client.Export() + if err != nil { + t.Fatal(err) + } + + if !strings.HasPrefix(string(output), " + + + + + + + ` + + b := bytes.NewReader([]byte(data)) + err := client.Import(ioutil.NopCloser(b)) + if err != nil { + t.Fatal(err) + } +} -- cgit v1.2.3