mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-01-22 20:00:44 -05:00
scaleway is about to introduce multiple regions, so we anticipate this change by upgrading the API sdk to a version supporting regions
22 lines
559 B
Go
22 lines
559 B
Go
package api
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/scaleway/scaleway-cli/pkg/scwversion"
|
|
. "github.com/smartystreets/goconvey/convey"
|
|
)
|
|
|
|
func TestNewScalewayAPI(t *testing.T) {
|
|
Convey("Testing NewScalewayAPI()", t, func() {
|
|
api, err := NewScalewayAPI("my-organization", "my-token", scwversion.UserAgent(), "")
|
|
So(err, ShouldBeNil)
|
|
So(api, ShouldNotBeNil)
|
|
So(api.Token, ShouldEqual, "my-token")
|
|
So(api.Organization, ShouldEqual, "my-organization")
|
|
So(api.Cache, ShouldNotBeNil)
|
|
So(api.client, ShouldNotBeNil)
|
|
So(api.Logger, ShouldNotBeNil)
|
|
})
|
|
}
|