@@ -10,6 +10,7 @@ import (
1010 "github.com/apache/arrow/go/v15/arrow"
1111 "github.com/apache/arrow/go/v15/arrow/array"
1212 "github.com/apache/arrow/go/v15/arrow/memory"
13+ "github.com/cloudquery/cloudquery/plugins/destination/azblob/client/spec"
1314 "github.com/cloudquery/filetypes/v4"
1415 "github.com/cloudquery/plugin-sdk/v4/message"
1516 "github.com/cloudquery/plugin-sdk/v4/plugin"
@@ -19,8 +20,8 @@ import (
1920)
2021
2122const (
22- storage_account = "cqdestinationazblob"
23- container = "test"
23+ storageAccount = "cqdestinationazblob"
24+ container = "test"
2425)
2526
2627func TestPlugin (t * testing.T ) {
@@ -29,30 +30,28 @@ func TestPlugin(t *testing.T) {
2930 filetypes .FormatTypeJSON ,
3031 filetypes .FormatTypeParquet ,
3132 } {
32- spec := Spec {
33- StorageAccount : storage_account ,
33+ s := spec. Spec {
34+ StorageAccount : storageAccount ,
3435 Container : container ,
3536 Path : t .TempDir (),
3637 NoRotate : true ,
37- FileSpec : & filetypes.FileSpec {
38- Format : ft ,
39- },
38+ FileSpec : filetypes.FileSpec {Format : ft },
4039 }
4140
4241 t .Run ("generic/" + string (ft ), func (t * testing.T ) {
43- testPlugin (t , & spec )
42+ testPlugin (t , & s )
4443 })
4544
4645 t .Run ("write/" + string (ft ), func (t * testing.T ) {
47- testPluginCustom (t , & spec )
46+ testPluginCustom (t , & s )
4847 })
4948 }
5049}
5150
52- func testPlugin (t * testing.T , spec * Spec ) {
51+ func testPlugin (t * testing.T , s * spec. Spec ) {
5352 ctx := context .Background ()
5453 p := plugin .NewPlugin ("azblob" , "development" , New )
55- b , err := json .Marshal (spec )
54+ b , err := json .Marshal (s )
5655 if err != nil {
5756 t .Fatal (err )
5857 }
@@ -71,7 +70,7 @@ func testPlugin(t *testing.T, spec *Spec) {
7170 )
7271}
7372
74- func testPluginCustom (t * testing.T , spec * Spec ) {
73+ func testPluginCustom (t * testing.T , s * spec. Spec ) {
7574 ctx := context .Background ()
7675
7776 var client plugin.Client
@@ -81,7 +80,7 @@ func testPluginCustom(t *testing.T, spec *Spec) {
8180 client , err = New (ctx , logger , spec , opts )
8281 return client , err
8382 })
84- b , err := json .Marshal (spec )
83+ b , err := json .Marshal (s )
8584 if err != nil {
8685 t .Fatal (err )
8786 }
0 commit comments