Skip to content

Commit

Permalink
edit fixture fix4. rockstor#876
Browse files Browse the repository at this point in the history
  • Loading branch information
Mchakravartula committed Sep 10, 2015
1 parent a5e8872 commit 0f0694c
Show file tree
Hide file tree
Showing 2 changed files with 193 additions and 20 deletions.
207 changes: 190 additions & 17 deletions src/rockstor/storageadmin/fixtures/fix4.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"is_active": true,
"is_superuser": false,
"is_staff": false,
"last_login": "2015-09-08T11:00:54.897Z",
"last_login": "2015-09-09T13:42:15.747Z",
"groups": [],
"user_permissions": [],
"password": "pbkdf2_sha256$12000$dNhX8YLKcowR$zFznR0gJDjF+HhJ2cLvvj4nhHINR4SdwzDfDellHl0E=",
Expand All @@ -18,10 +18,10 @@
}
},
{
"pk": "ifzqgo4z9escqgcyrp5uyeadgcsk5v02",
"pk": "tgldm5nmpp5n7f6xdlptjzgjccwfhjc3",
"model": "sessions.session",
"fields": {
"expire_date": "2015-09-22T11:00:54.902Z",
"expire_date": "2015-09-23T13:42:15.791Z",
"session_data": "NjY3MGEzMTNmYmFmNzQxMGIzZTcxNTgxNDZlNTE5OWU3Mzc3OTJkMTp7Il9hdXRoX3VzZXJfYmFja2VuZCI6ImRqYW5nby5jb250cmliLmF1dGguYmFja2VuZHMuTW9kZWxCYWNrZW5kIiwiX2F1dGhfdXNlcl9pZCI6MX0="
}
},
Expand All @@ -42,7 +42,7 @@
"uuid": "54451c3d-ab13-4ac1-8f5d-9856ae4e301f",
"name": "rockstor_rockstor",
"mnt_options": null,
"toc": "2015-09-08T11:36:01.555Z",
"toc": "2015-09-09T13:42:16.989Z",
"size": 8924160
}
},
Expand All @@ -55,7 +55,7 @@
"uuid": "d752b110-9a94-4ee6-978b-408321aac666",
"name": "pool1",
"mnt_options": "",
"toc": "2015-09-08T11:36:01.919Z",
"toc": "2015-09-09T13:42:17.425Z",
"size": 4194304
}
},
Expand All @@ -68,7 +68,7 @@
"uuid": "f36af68a-6bd9-4b22-ae74-4c70d45ef328",
"name": "pool2",
"mnt_options": "",
"toc": "2015-09-08T11:36:02.253Z",
"toc": "2015-09-09T13:42:17.736Z",
"size": 2097152
}
},
Expand Down Expand Up @@ -284,7 +284,7 @@
"owner": "root",
"replica": false,
"qgroup": "0/258",
"toc": "2015-09-08T11:36:02.501Z",
"toc": "2015-09-09T13:42:18.438Z",
"subvol_name": "share1",
"rusage": 16,
"pool": 2,
Expand All @@ -305,7 +305,7 @@
"owner": "root",
"replica": false,
"qgroup": "0/258",
"toc": "2015-09-08T11:36:02.599Z",
"toc": "2015-09-09T13:42:18.525Z",
"subvol_name": "share2",
"rusage": 16,
"pool": 3,
Expand All @@ -326,7 +326,7 @@
"owner": "root",
"replica": false,
"qgroup": "0/257",
"toc": "2015-09-08T11:36:02.356Z",
"toc": "2015-09-09T13:42:18.247Z",
"subvol_name": "home",
"rusage": 16,
"pool": 1,
Expand All @@ -347,7 +347,7 @@
"owner": "root",
"replica": false,
"qgroup": "0/272",
"toc": "2015-09-08T11:36:02.374Z",
"toc": "2015-09-09T13:42:18.274Z",
"subvol_name": "clone1",
"rusage": 16,
"pool": 1,
Expand All @@ -368,7 +368,7 @@
"owner": "root",
"replica": false,
"qgroup": "0/258",
"toc": "2015-09-08T11:36:02.400Z",
"toc": "2015-09-09T13:42:18.306Z",
"subvol_name": "root",
"rusage": 2181038,
"pool": 1,
Expand All @@ -389,7 +389,7 @@
"owner": "root",
"replica": false,
"qgroup": "0/280",
"toc": "2015-09-08T11:36:02.419Z",
"toc": "2015-09-09T13:42:18.351Z",
"subvol_name": "clone",
"rusage": 16,
"pool": 1,
Expand All @@ -410,15 +410,15 @@
"owner": "root",
"replica": false,
"qgroup": "0/263",
"toc": "2015-09-08T11:36:02.436Z",
"toc": "2015-09-09T13:42:18.373Z",
"subvol_name": "Co",
"rusage": 16,
"pool": 1,
"size": 8924160
}
},
{
"pk": 1,
"pk": 11,
"model": "storageadmin.nfsexportgroup",
"fields": {
"admin_host": null,
Expand All @@ -431,10 +431,10 @@
}
},
{
"pk": 1,
"pk": 11,
"model": "storageadmin.nfsexport",
"fields": {
"export_group": 1,
"export_group": 11,
"share": 1,
"mount": "/export/share1"
}
Expand Down Expand Up @@ -538,6 +538,13 @@
"name": "backup"
}
},
{
"pk": 3,
"model": "storageadmin.advancednfsexport",
"fields": {
"export_str": "/export/share2 *.edu(rw,async,insecure)"
}
},
{
"pk": 1,
"model": "storageadmin.oauthapp",
Expand All @@ -547,6 +554,16 @@
"user": 1
}
},
{
"pk": 8,
"model": "storageadmin.netatalkshare",
"fields": {
"path": "/mnt2/share1",
"share": 1,
"description": "share1 on Rockstor",
"time_machine": "yes"
}
},
{
"pk": 1,
"model": "storageadmin.rockon",
Expand Down Expand Up @@ -808,7 +825,7 @@
}
},
{
"pk": 2,
"pk": 8,
"model": "storageadmin.dcontainerlink",
"fields": {
"source": 4,
Expand Down Expand Up @@ -1576,5 +1593,161 @@
],
"scope": "read write"
}
},
{
"pk": 6,
"model": "oauth2_provider.accesstoken",
"fields": {
"application": 1,
"token": "xfgYUYnnXFLyHHZRAkswgnsgd56CSZ",
"expires": "2015-09-08T21:51:16.497Z",
"user": [
"admin"
],
"scope": "read write"
}
},
{
"pk": 7,
"model": "oauth2_provider.accesstoken",
"fields": {
"application": 1,
"token": "DbVi8FL55rMC59TRhSlpeg8DlC9r1n",
"expires": "2015-09-08T21:51:18.011Z",
"user": [
"admin"
],
"scope": "read write"
}
},
{
"pk": 8,
"model": "oauth2_provider.accesstoken",
"fields": {
"application": 1,
"token": "oODdmjZwIDHS8xKoBWIbQO1zQwaG28",
"expires": "2015-09-08T21:51:28.561Z",
"user": [
"admin"
],
"scope": "read write"
}
},
{
"pk": 9,
"model": "oauth2_provider.accesstoken",
"fields": {
"application": 1,
"token": "yh5SOBgQtCash1E8fofBzfsbGOfSME",
"expires": "2015-09-08T21:51:29.762Z",
"user": [
"admin"
],
"scope": "read write"
}
},
{
"pk": 10,
"model": "oauth2_provider.accesstoken",
"fields": {
"application": 1,
"token": "UsTnB78s4UN8XPt1ggTnRAGRSPdplz",
"expires": "2015-09-08T22:48:07.095Z",
"user": [
"admin"
],
"scope": "read write"
}
},
{
"pk": 11,
"model": "oauth2_provider.accesstoken",
"fields": {
"application": 1,
"token": "n3kuqR5oPZ05PNhTrCJ9KrjBSLEpq2",
"expires": "2015-09-08T22:48:08.976Z",
"user": [
"admin"
],
"scope": "read write"
}
},
{
"pk": 12,
"model": "oauth2_provider.accesstoken",
"fields": {
"application": 1,
"token": "UZSEDukk6kjuxOHKaj3aGGFHqXgzwj",
"expires": "2015-09-08T22:48:19.456Z",
"user": [
"admin"
],
"scope": "read write"
}
},
{
"pk": 13,
"model": "oauth2_provider.accesstoken",
"fields": {
"application": 1,
"token": "FOOh3KFtLAjrgPXLWp3eUDyfvwdHnF",
"expires": "2015-09-08T22:48:20.115Z",
"user": [
"admin"
],
"scope": "read write"
}
},
{
"pk": 14,
"model": "oauth2_provider.accesstoken",
"fields": {
"application": 1,
"token": "tkWiKDmFvm10jmRWETdyei1tRWJPCw",
"expires": "2015-09-09T23:06:51.645Z",
"user": [
"admin"
],
"scope": "read write"
}
},
{
"pk": 15,
"model": "oauth2_provider.accesstoken",
"fields": {
"application": 1,
"token": "6Gh0Uy4UmVLbB9Cm13L14zDww2j9Nc",
"expires": "2015-09-09T23:41:21.161Z",
"user": [
"admin"
],
"scope": "read write"
}
},
{
"pk": 16,
"model": "oauth2_provider.accesstoken",
"fields": {
"application": 1,
"token": "zBgMa6bttL3n5NFXBvkjfU5Ti6UBVC",
"expires": "2015-09-09T23:41:30.203Z",
"user": [
"admin"
],
"scope": "read write"
}
},
{
"pk": 17,
"model": "oauth2_provider.accesstoken",
"fields": {
"application": 1,
"token": "8D09ZmhC6IZ1brv1jEUdr5WPwNDXs1",
"expires": "2015-09-09T23:42:16.489Z",
"user": [
"admin"
],
"scope": "read write"
}
}
]
6 changes: 3 additions & 3 deletions src/rockstor/storageadmin/tests/test_nfs_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,14 @@ def test_put_requests(self):
self.assertEqual(response.data['detail'], e_msg)

# happy path
nfs_id = 1
nfs_id = 11
data = {'shares':('share2',), 'host_str': '*.edu' , 'mod_choice': 'rw','sync_choice': 'async', }
response = self.client.put('%s/%d' % (self.BASE_URL, nfs_id), data=data)
self.assertEqual(response.status_code,
status.HTTP_200_OK, msg=response.data)

# happy path2 with admin host
nfs_id = 1
nfs_id = 11
data = {'shares':('share2',), 'host_str': '*.edu' , 'admin_host':'host', 'mod_choice': 'rw','sync_choice': 'async', }
response = self.client.put('%s/%d' % (self.BASE_URL, nfs_id), data=data)
self.assertEqual(response.status_code,
Expand All @@ -215,7 +215,7 @@ def test_delete_requests(self):
"""

# happy path
nfs_id = 1
nfs_id = 11
response = self.client.delete('%s/%d' % (self.BASE_URL, nfs_id))
self.assertEqual(response.status_code,
status.HTTP_200_OK, msg=response.data)
Expand Down

0 comments on commit 0f0694c

Please sign in to comment.