Commit 29b6dc1d authored by John Red Medrano's avatar John Red Medrano

Merge branch 'red-develop' of http://54.169.104.100:27015/red/red-ci-cd into red-develop

parents e0a23375 9c7889d0
...@@ -10,6 +10,15 @@ stages: ...@@ -10,6 +10,15 @@ stages:
# - re-deploy-dev # - re-deploy-dev
# - clean_re-deploy-dev # - clean_re-deploy-dev
all_tests:
stage: all_tests
script:
- git clone http://tir:Qwerty1234@54.169.104.100:27015/red/red-ci-cd.git -b new-test
- pip install -r red-ci-cd/requirements/local.txt
- echo "test"
- python3 manage.py test red-ci-cd.test
initial_repo: initial_repo:
stage: initial_repo stage: initial_repo
......
[SETTINGS]
BATCH_UPLOAD_FORMAT_FILENAME = instruction.pdf
SSL = 1
DATABASE_ENGINE = django.db.backends.mysql
DATABASE_NAME = rms_db
DATABASE_USER = oneberry
DATABASE_PASSWORD = 0N3Berryt!r
DATABASE_HOST = 52.74.129.178
DATABASE_PORT = 3306
SESSION_TIMEOUT = 100000
FRONT_END_URL = http://devweb.rmsv2.oneberrysystem.com
AUTH_ACCESSS_TOKEN_TIMEOUT = 3600
USER_DEFAULT_PASSWORD = password
CATCH_EMAIL = gladys@tirsolutions.com
CR_LINK = http://localhost:8000/cms/change-request/form/view
REALTIMESERVER_IP = 127.0.0.1:8000
DEBUG = False
app_id = 957253
key = c29a7f6579108991e79e
secret = b3df5d55196b5fbd3eff
cluster = api
cms_notification = cms_notification
wow = $wow
wow2 = $wow2
[NOTIFICATION_EMAIL]
APPROVER_MESSAGE = has sent you an APPROVAL REQUEST for change request;RMS-ACTIONREQUIRED
REQUESTOR_MESSAGE = has APPROVED the change request;RMS-CRAPPROVED
REQUESTOR_REJECT_MESSAGE = has REJECTED the change request;RMS-CRREJECTED
VENDOR_ACKNOWLEDGE_MESSAGE = has sent you an ACKNOWLEDGEMENT REQUEST for change request;RMS-ACTIONREQUIRED-VENDOR
REQUESTOR_ACKNOWLEDGE_MESSAGE = has ACKNOWLEDGED the change request;RMS-CRACKNOWLEDGE
REQUESTOR_COMPLETION_MESSAGE = has COMPLETED the change request;RMS-CRCOMPLETED
VENDOR_ACCEPTANCE_MESSAGE = has ACCEPTED the change request;RMS-CRACCEPTED
VENDOR_REJECT_MESSAGE = has REJECTED the change request;RMS-CRREJECTED-VENDOR
REVISED_MESSAGE = has REJECTED the change request for your revision;RMS-CRREVISED
CANCEL_MESSAGE = has CANCELLED the change request;RMS-CRCANCELLED-USERTRIGGER
APPROVER_REJECT_MESSAGE = has REJECTED the change request for your approval;RMS-CRREJECTED-APPROVER
...@@ -11,7 +11,7 @@ CairoSVG==2.4.2 ...@@ -11,7 +11,7 @@ CairoSVG==2.4.2
certifi==2019.6.16 certifi==2019.6.16
cffi==1.12.3 cffi==1.12.3
channels==2.2.0 channels==2.2.0
channels-redis==2.4.0 channels-redis==2.3.2
chardet==3.0.4 chardet==3.0.4
colorama==0.4.1 colorama==0.4.1
constantly==15.1.0 constantly==15.1.0
...@@ -42,7 +42,7 @@ msgpack==0.6.1 ...@@ -42,7 +42,7 @@ msgpack==0.6.1
mysqlclient==1.4.2.post1 mysqlclient==1.4.2.post1
ndg-httpsclient==0.5.1 ndg-httpsclient==0.5.1
numpy==1.17.3 numpy==1.17.3
openpyxl==3.0.0 openpyxl==2.6.4
pandas==0.25.3 pandas==0.25.3
pep8==1.7.1 pep8==1.7.1
Pillow==6.0.0 Pillow==6.0.0
......
[
{
"model": "entities.application",
"pk": 1,
"fields": {
"created": "2019-09-23T12:43:33.754",
"createdby": "superuser",
"modified": "2019-09-23T12:43:33.754",
"modifiedby": "superuser",
"code": "APP-20190923-0000001",
"name": "Resource Management System",
"excel_code": "rms"
}
},
{
"model": "entities.application",
"pk": 2,
"fields": {
"created": "2019-09-23T12:43:40.512",
"createdby": "superuser",
"modified": "2019-09-23T12:43:40.512",
"modifiedby": "superuser",
"code": "APP-20190923-0000002",
"name": "Change Management System",
"excel_code": "cms"
}
},
{
"model": "entities.application",
"pk": 3,
"fields": {
"created": "2019-09-23T12:43:55.957",
"createdby": "superuser",
"modified": "2019-09-23T12:43:55.957",
"modifiedby": "superuser",
"code": "APP-20190923-0000003",
"name": "Asset Management System",
"excel_code": "ams"
}
},
{
"model": "entities.module",
"pk": 1,
"fields": {
"created": "2019-09-27T12:49:27.795",
"createdby": "superuser",
"modified": "2019-09-27T12:49:27.795",
"modifiedby": "superuser",
"application": "APP-20190923-0000001",
"code": "MODULE-20190927-0000001",
"name": "Application Management",
"parent": null,
"sort_id": 1,
"component": "rms/application-management"
}
},
{
"model": "entities.module",
"pk": 2,
"fields": {
"created": "2019-09-27T12:49:31.756",
"createdby": "superuser",
"modified": "2019-09-27T13:00:57.280",
"modifiedby": "superuser",
"application": "APP-20190923-0000001",
"code": "MODULE-20190927-0000002",
"name": "Company Management",
"parent": null,
"sort_id": 6,
"component": "rms/company-management"
}
},
{
"model": "entities.module",
"pk": 3,
"fields": {
"created": "2019-09-27T12:49:49.528",
"createdby": "superuser",
"modified": "2019-09-27T13:00:18.423",
"modifiedby": "superuser",
"application": "APP-20190923-0000001",
"code": "MODULE-20190927-0000003",
"name": "Department Management",
"parent": null,
"sort_id": 10,
"component": "rms/department-management"
}
},
{
"model": "entities.module",
"pk": 4,
"fields": {
"created": "2019-09-27T12:49:57.378",
"createdby": "superuser",
"modified": "2019-09-27T12:58:07.634",
"modifiedby": "superuser",
"application": "APP-20190923-0000001",
"code": "MODULE-20190927-0000004",
"name": "Module Management",
"parent": null,
"sort_id": 11,
"component": "rms/module-management"
}
},
{
"model": "entities.module",
"pk": 5,
"fields": {
"created": "2019-09-27T12:50:01.383",
"createdby": "superuser",
"modified": "2019-09-30T14:37:53.210",
"modifiedby": "superuser",
"application": "APP-20190923-0000001",
"code": "MODULE-20190927-0000005",
"name": "User Management",
"parent": null,
"sort_id": 12,
"component": "rms/user-management"
}
},
{
"model": "entities.module",
"pk": 6,
"fields": {
"created": "2019-09-27T12:50:15.910",
"createdby": "superuser",
"modified": "2019-09-27T19:04:53.805",
"modifiedby": "superuser",
"application": "APP-20190923-0000002",
"code": "MODULE-20190927-0000006",
"name": "Change Request Template",
"parent": null,
"sort_id": 7,
"component": "cms/change-request/template"
}
},
{
"model": "entities.module",
"pk": 10,
"fields": {
"created": "2019-09-28T12:28:20.174",
"createdby": "superuser",
"modified": "2019-09-30T14:38:38.604",
"modifiedby": "superuser",
"application": "APP-20190923-0000002",
"code": "MODULE-20190928-0000010",
"name": "Change Request Form",
"parent": null,
"sort_id": 6,
"component": "cms/change-request/form"
}
},
{
"model": "entities.module",
"pk": 11,
"fields": {
"created": "2019-09-30T17:15:33.022",
"createdby": "superuser",
"modified": "2019-09-30T17:15:33.022",
"modifiedby": "superuser",
"application": "APP-20190923-0000002",
"code": "MODULE-20190930-0000011",
"name": "Notification",
"parent": null,
"sort_id": 1,
"component": "cms/notifications"
}
},
{
"model": "entities.module",
"pk": 19,
"fields": {
"created": "2019-11-07T17:27:21.486",
"createdby": "superuser",
"modified": "2019-11-07T17:27:21.486",
"modifiedby": "superuser",
"application": "APP-20190923-0000001",
"code": "MODULE-20191107-0000019",
"name": "Delegation Management",
"parent": null,
"sort_id": 13,
"component": "rms/delegation-management"
}
},
{
"model": "entities.module",
"pk": 20,
"fields": {
"created": "2020-03-19T11:43:06.231",
"createdby": "superuser",
"modified": "2020-03-19T11:43:06.231",
"modifiedby": "superuser",
"application": "APP-20190923-0000003",
"code": "MODULE-20200319-0000020",
"name": "Asset Group",
"parent": null,
"sort_id": 2,
"component": "ams/asset-groups"
}
},
{
"model": "entities.module",
"pk": 21,
"fields": {
"created": "2020-03-19T11:43:41.894",
"createdby": "superuser",
"modified": "2020-03-19T11:43:41.894",
"modifiedby": "superuser",
"application": "APP-20190923-0000003",
"code": "MODULE-20200319-0000021",
"name": "Asset",
"parent": null,
"sort_id": 3,
"component": "ams/assets"
}
},
{
"model": "entities.module",
"pk": 22,
"fields": {
"created": "2020-03-19T11:55:27.206",
"createdby": "superuser",
"modified": "2020-03-19T11:55:27.206",
"modifiedby": "superuser",
"application": "APP-20190923-0000003",
"code": "MODULE-20200319-0000022",
"name": "Asset Stock",
"parent": null,
"sort_id": 4,
"component": "ams/asset-stock"
}
},
{
"model": "entities.module",
"pk": 23,
"fields": {
"created": "2020-03-19T11:55:53.847",
"createdby": "superuser",
"modified": "2020-03-19T11:55:53.847",
"modifiedby": "superuser",
"application": "APP-20190923-0000003",
"code": "MODULE-20200319-0000023",
"name": "Report",
"parent": null,
"sort_id": 5,
"component": "ams/report"
}
},
{
"model": "entities.module",
"pk": 24,
"fields": {
"created": "2020-03-19T11:56:26.634",
"createdby": "superuser",
"modified": "2020-03-19T11:56:26.635",
"modifiedby": "superuser",
"application": "APP-20190923-0000003",
"code": "MODULE-20200319-0000024",
"name": "Asset Type",
"parent": null,
"sort_id": 8,
"component": "ams/asset-type-templates"
}
},
{
"model": "entities.module",
"pk": 25,
"fields": {
"created": "2020-03-19T11:56:46.268",
"createdby": "superuser",
"modified": "2020-03-19T11:56:46.268",
"modifiedby": "superuser",
"application": "APP-20190923-0000003",
"code": "MODULE-20200319-0000025",
"name": "Report Type",
"parent": null,
"sort_id": 9,
"component": "ams/report-type"
}
},
{
"model": "entities.delegation",
"pk": 1,
"fields": {
"created": "2019-11-19T17:46:08.984",
"createdby": "superuser",
"modified": "2019-11-19T17:46:08.984",
"modifiedby": "superuser",
"code": "DELEGATION-20191119-0000001",
"name": "Requestor"
}
},
{
"model": "entities.delegation",
"pk": 2,
"fields": {
"created": "2019-11-19T17:46:18.010",
"createdby": "superuser",
"modified": "2019-11-19T17:46:18.010",
"modifiedby": "superuser",
"code": "DELEGATION-20191119-0000002",
"name": "Vendor/Implementor"
}
},
{
"model": "entities.delegation",
"pk": 3,
"fields": {
"created": "2019-11-19T17:46:26.168",
"createdby": "superuser",
"modified": "2019-11-22T10:03:40.605",
"modifiedby": "superuser",
"code": "DELEGATION-20191119-0000003",
"name": "Head of Department"
}
},
{
"model": "entities.delegation",
"pk": 4,
"fields": {
"created": "2019-11-19T17:46:34.020",
"createdby": "superuser",
"modified": "2019-11-19T17:46:34.020",
"modifiedby": "superuser",
"code": "DELEGATION-20191119-0000004",
"name": "SD/OD"
}
},
{
"model": "entities.delegation",
"pk": 5,
"fields": {
"created": "2019-11-19T17:46:41.461",
"createdby": "superuser",
"modified": "2019-11-19T17:46:41.462",
"modifiedby": "superuser",
"code": "DELEGATION-20191119-0000005",
"name": "Change Control Board"
}
},
{
"model": "entities.delegation",
"pk": 6,
"fields": {
"created": "2019-11-19T17:46:49.472",
"createdby": "superuser",
"modified": "2019-11-19T17:46:49.472",
"modifiedby": "superuser",
"code": "DELEGATION-20191119-0000006",
"name": "Approver"
}
},
{
"model": "entities.company",
"pk": 1,
"fields": {
"created": "2019-09-23T12:45:31.058",
"createdby": "superuser",
"modified": "2019-10-01T18:10:40.098",
"modifiedby": "superuser",
"code": "COMPANY-20190923-0000001",
"name": "Oneberry Technologies Pte Ltd",
"contact_details": "2152509"
}
},
{
"model": "entities.department",
"pk": 1,
"fields": {
"created": "2019-09-23T12:45:52.531",
"createdby": "superuser",
"modified": "2019-10-01T18:12:27.956",
"modifiedby": "superuser",
"company": "COMPANY-20190923-0000001",
"code": "DEPARTMENT-20190923-0000001",
"name": "Super User",
"delegation": []
}
},
{
"model": "entities.user",
"pk": 1,
"fields": {
"last_login": "2020-01-13T21:50:01.985",
"is_superuser": true,
"first_name": "",
"last_name": "",
"is_staff": true,
"is_active": true,
"date_joined": "2019-09-23T12:42:37.938",
"department": "DEPARTMENT-20190923-0000001",
"default_app": "APP-20190923-0000001",
"user_type": "SU",
"code": "USER-20190923-0000001",
"name": "",
"username": "superuser",
"password": "pbkdf2_sha256$150000$YLmqqWBQGsJG$r4NYkY05q1zlmgzh106ejBbzd0NY00YEfylllyVQyk0=",
"doa": null,
"contact_no": null,
"email": "jeffrey@tirsolutions.com",
"groups": [],
"user_permissions": [],
"application": [
1,
2,
3
]
}
},
{
"model": "entities.userimage",
"pk": 5,
"fields": {
"created": "2020-02-21T18:14:44.307",
"createdby": "superuser",
"modified": "2020-02-21T18:14:44.307",
"modifiedby": "superuser",
"user": "USER-20190923-0000001",
"name": "_profile_pic.png",
"image": "user_images/_profile_pic.png",
"is_primary": true
}
},
{
"model": "authtoken.token",
"pk": "8b6d17d859bef3c660d516d9dde982ba73e74de0",
"fields": {
"user": 1,
"created": "2020-04-14T11:04:07.257"
}
}
]
from rest_framework import status
from rest_framework.test import APITestCase
from rest_framework.test import force_authenticate
from rest_framework.test import APIClient
from app.entities.models import User
# from api.models import ChatRoom
class ChatRoomTest(APITestCase):
fixtures = ['test-data.json']
def test_login2(self):
self.url = '/api/v1/auth/login/'
self.body = {
"username": 'superuser',
'password': 'password123'
}
request = self.client.post(self.url, self.body, format='multipart')
self.assertEqual(request.status_code, status.HTTP_200_OK)
stages:
- wow
wow:
stage: wow
when: on_failure
script:
- echo "hahaha"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment