Skip to content

Commit

Permalink
updated unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gman0 committed Jul 14, 2021
1 parent e7a4a25 commit bebec5c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 26 deletions.
4 changes: 4 additions & 0 deletions openstack/sharedfilesystems/v2/shares/testing/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ var createResponse = `{
"replication_type": null,
"task_state": null,
"snapshot_support": true,
"create_share_from_snapshot_support": true,
"consistency_group_id": "9397c191-8427-4661-a2e8-b23820dc01d4",
"source_cgsnapshot_member_id": null,
"volume_type": "default",
Expand Down Expand Up @@ -133,6 +134,7 @@ var updateResponse = `
"task_state": null,
"is_public": false,
"snapshot_support": true,
"create_share_from_snapshot_support": true,
"name": "my_new_test_share",
"created_at": "2015-09-18T10:25:24.000000",
"share_proto": "NFS",
Expand Down Expand Up @@ -188,6 +190,7 @@ var getResponse = `{
"task_state": null,
"is_public": true,
"snapshot_support": true,
"create_share_from_snapshot_support": true,
"name": "my_test_share",
"created_at": "2015-09-18T10:25:24.000000",
"share_proto": "NFS",
Expand Down Expand Up @@ -241,6 +244,7 @@ var listDetailResponse = `{
"task_state": null,
"is_public": true,
"snapshot_support": true,
"create_share_from_snapshot_support": true,
"name": "my_test_share",
"created_at": "2015-09-18T10:25:24.000000",
"share_proto": "NFS",
Expand Down
54 changes: 28 additions & 26 deletions openstack/sharedfilesystems/v2/shares/testing/request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,20 @@ func TestGet(t *testing.T) {
"project": "my_app",
"aim": "doc",
},
Status: "available",
Description: "My custom share London",
Host: "manila2@generic1#GENERIC1",
HasReplicas: false,
ReplicationType: "",
TaskState: "",
SnapshotSupport: true,
Name: "my_test_share",
CreatedAt: time.Date(2015, time.September, 18, 10, 25, 24, 0, time.UTC),
ShareProto: "NFS",
VolumeType: "default",
SourceCgsnapshotMemberID: "",
IsPublic: true,
Status: "available",
Description: "My custom share London",
Host: "manila2@generic1#GENERIC1",
HasReplicas: false,
ReplicationType: "",
TaskState: "",
SnapshotSupport: true,
CreateShareFromSnapshotSupport: true,
Name: "my_test_share",
CreatedAt: time.Date(2015, time.September, 18, 10, 25, 24, 0, time.UTC),
ShareProto: "NFS",
VolumeType: "default",
SourceCgsnapshotMemberID: "",
IsPublic: true,
Links: []map[string]string{
{
"href": "http://172.18.198.54:8786/v2/16e1ab15c35a457e9c2b2aa189f544e1/shares/011d21e2-fbc3-4e4a-9993-9ea223f73264",
Expand Down Expand Up @@ -134,19 +135,20 @@ func TestListDetail(t *testing.T) {
"project": "my_app",
"aim": "doc",
},
Status: "available",
Description: "My custom share London",
Host: "manila2@generic1#GENERIC1",
HasReplicas: false,
ReplicationType: "",
TaskState: "",
SnapshotSupport: true,
Name: "my_test_share",
CreatedAt: time.Date(2015, time.September, 18, 10, 25, 24, 0, time.UTC),
ShareProto: "NFS",
VolumeType: "default",
SourceCgsnapshotMemberID: "",
IsPublic: true,
Status: "available",
Description: "My custom share London",
Host: "manila2@generic1#GENERIC1",
HasReplicas: false,
ReplicationType: "",
TaskState: "",
SnapshotSupport: true,
CreateShareFromSnapshotSupport: true,
Name: "my_test_share",
CreatedAt: time.Date(2015, time.September, 18, 10, 25, 24, 0, time.UTC),
ShareProto: "NFS",
VolumeType: "default",
SourceCgsnapshotMemberID: "",
IsPublic: true,
Links: []map[string]string{
{
"href": "http://172.18.198.54:8786/v2/16e1ab15c35a457e9c2b2aa189f544e1/shares/011d21e2-fbc3-4e4a-9993-9ea223f73264",
Expand Down

0 comments on commit bebec5c

Please sign in to comment.