mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-03-17 21:08:03 +02:00
Main build (Jenkins)
This commit is contained in:
parent
4b3769ff45
commit
7591e2c05e
4
.github/workflows/oint_test_full_ru.yml
vendored
4
.github/workflows/oint_test_full_ru.yml
vendored
@ -1286,6 +1286,10 @@ jobs:
|
||||
|
||||
|
||||
|
||||
- name: Общие методы
|
||||
if: ${{ cancelled() }} == false
|
||||
run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os "CLI_AWS_ОбщиеМетоды"
|
||||
|
||||
- name: Работа с бакетами
|
||||
if: ${{ cancelled() }} == false
|
||||
run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os "CLI_AWS_РаботаСБакетами"
|
||||
|
@ -641,6 +641,10 @@ pipeline {
|
||||
steps {
|
||||
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_AWS_ОбщиеМетоды"'
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_AWS_РаботаСБакетами"'
|
||||
}
|
||||
|
@ -641,6 +641,10 @@ pipeline {
|
||||
steps {
|
||||
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "AWS_ОбщиеМетоды"'
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "AWS_РаботаСБакетами"'
|
||||
}
|
||||
|
5
docs/en/data/S3/GetBasicDataStructure.json
Normal file
5
docs/en/data/S3/GetBasicDataStructure.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"URL": "storage-155.s3hoster.by",
|
||||
"AccessKey": "BRN5RKJE67...",
|
||||
"SecretKey": "NNhv+i9PrytpT8Tu0C1N..."
|
||||
}
|
5
docs/en/data/S3/SendRequestWithBody.json
Normal file
5
docs/en/data/S3/SendRequestWithBody.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"URL": "storage-155.s3hoster.by",
|
||||
"AccessKey": "BRN5RKJE67...",
|
||||
"SecretKey": "NNhv+i9PrytpT8Tu0C1N..."
|
||||
}
|
5
docs/en/data/S3/SendRequestWithoutBody.json
Normal file
5
docs/en/data/S3/SendRequestWithoutBody.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"URL": "storage-155.s3hoster.by",
|
||||
"AccessKey": "BRN5RKJE67...",
|
||||
"SecretKey": "NNhv+i9PrytpT8Tu0C1N..."
|
||||
}
|
6
docs/en/examples/S3/GetBasicDataStructure.txt
Normal file
6
docs/en/examples/S3/GetBasicDataStructure.txt
Normal file
@ -0,0 +1,6 @@
|
||||
URL = "storage-155.s3hoster.by";
|
||||
AccessKey = "BRN5RKJE67...";
|
||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||
Region = "BTC";
|
||||
|
||||
Result = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
11
docs/en/examples/S3/SendRequestWithBody.txt
Normal file
11
docs/en/examples/S3/SendRequestWithBody.txt
Normal file
@ -0,0 +1,11 @@
|
||||
URL = "storage-155.s3hoster.by";
|
||||
AccessKey = "BRN5RKJE67...";
|
||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||
Region = "BTC";
|
||||
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
Method = "PUT";
|
||||
Body = "C:\test_data\document.docx"; // URL, Path or Binary Data
|
||||
|
||||
Result = OPI_S3.SendRequestWithBody(Method, BasicData, Body);
|
9
docs/en/examples/S3/SendRequestWithoutBody.txt
Normal file
9
docs/en/examples/S3/SendRequestWithoutBody.txt
Normal file
@ -0,0 +1,9 @@
|
||||
URL = "storage-155.s3hoster.by" + "/opi-newbucket2";
|
||||
AccessKey = "BRN5RKJE67...";
|
||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||
Region = "BTC";
|
||||
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
Method = "GET";
|
||||
|
||||
Result = OPI_S3.SendRequestWithoutBody(Method, BasicData);
|
@ -29,7 +29,12 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
```bsl title="1C:Enterprise/OneScript code example"
|
||||
URL = "storage-155.s3hoster.by";
|
||||
AccessKey = "BRN5RKJE67...";
|
||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||
Region = "BTC";
|
||||
|
||||
Result = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
```
|
||||
|
||||
|
||||
|
@ -31,7 +31,17 @@ Parameters with Binary data type can also accept file paths on disk and URLs
|
||||
|
||||
|
||||
```bsl title="1C:Enterprise/OneScript code example"
|
||||
URL = "storage-155.s3hoster.by";
|
||||
AccessKey = "BRN5RKJE67...";
|
||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||
Region = "BTC";
|
||||
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
Method = "PUT";
|
||||
Body = "C:\test_data\document.docx"; // URL, Path or Binary Data
|
||||
|
||||
Result = OPI_S3.SendRequestWithBody(Method, BasicData, Body);
|
||||
```
|
||||
|
||||
|
||||
|
@ -27,7 +27,15 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
```bsl title="1C:Enterprise/OneScript code example"
|
||||
URL = "storage-155.s3hoster.by" + "/opi-newbucket2";
|
||||
AccessKey = "BRN5RKJE67...";
|
||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||
Region = "BTC";
|
||||
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
Method = "GET";
|
||||
|
||||
Result = OPI_S3.SendRequestWithoutBody(Method, BasicData);
|
||||
```
|
||||
|
||||
|
||||
|
5
docs/ru/data/S3/ОтправитьЗапросБезТела.json
Normal file
5
docs/ru/data/S3/ОтправитьЗапросБезТела.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"URL": "storage-155.s3hoster.by",
|
||||
"AccessKey": "BRN5RKJE67...",
|
||||
"SecretKey": "NNhv+i9PrytpT8Tu0C1N..."
|
||||
}
|
5
docs/ru/data/S3/ОтправитьЗапросСТелом.json
Normal file
5
docs/ru/data/S3/ОтправитьЗапросСТелом.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"URL": "storage-155.s3hoster.by",
|
||||
"AccessKey": "BRN5RKJE67...",
|
||||
"SecretKey": "NNhv+i9PrytpT8Tu0C1N..."
|
||||
}
|
5
docs/ru/data/S3/ПолучитьСтруктуруДанных.json
Normal file
5
docs/ru/data/S3/ПолучитьСтруктуруДанных.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"URL": "storage-155.s3hoster.by",
|
||||
"AccessKey": "BRN5RKJE67...",
|
||||
"SecretKey": "NNhv+i9PrytpT8Tu0C1N..."
|
||||
}
|
9
docs/ru/examples/S3/ОтправитьЗапросБезТела.txt
Normal file
9
docs/ru/examples/S3/ОтправитьЗапросБезТела.txt
Normal file
@ -0,0 +1,9 @@
|
||||
URL = "storage-155.s3hoster.by" + "/opi-newbucket2";
|
||||
AccessKey = "BRN5RKJE67...";
|
||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||
Region = "BTC";
|
||||
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
Метод = "GET";
|
||||
|
||||
Результат = OPI_S3.ОтправитьЗапросБезТела(Метод, ОсновныеДанные);
|
11
docs/ru/examples/S3/ОтправитьЗапросСТелом.txt
Normal file
11
docs/ru/examples/S3/ОтправитьЗапросСТелом.txt
Normal file
@ -0,0 +1,11 @@
|
||||
URL = "storage-155.s3hoster.by";
|
||||
AccessKey = "BRN5RKJE67...";
|
||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||
Region = "BTC";
|
||||
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
Метод = "PUT";
|
||||
Тело = "C:\test_data\document.docx"; // URL, Путь или Двоичные данные
|
||||
|
||||
Результат = OPI_S3.ОтправитьЗапросСТелом(Метод, ОсновныеДанные, Тело);
|
6
docs/ru/examples/S3/ПолучитьСтруктуруДанных.txt
Normal file
6
docs/ru/examples/S3/ПолучитьСтруктуруДанных.txt
Normal file
@ -0,0 +1,6 @@
|
||||
URL = "storage-155.s3hoster.by";
|
||||
AccessKey = "BRN5RKJE67...";
|
||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||
Region = "BTC";
|
||||
|
||||
Результат = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
@ -54,9 +54,4 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"message": "Неподдерживаемое сообщение",
|
||||
"status": 200
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -46,9 +46,4 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 204,
|
||||
"response": {}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -54,9 +54,4 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 204,
|
||||
"response": {}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -54,9 +54,4 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"message": {},
|
||||
"status": 204
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -46,9 +46,4 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 404,
|
||||
"response": "version=\"1.0\" encoding=\"UTF-8\""
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -54,24 +54,4 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {
|
||||
"Tagging": {
|
||||
"TagSet": {
|
||||
"Tag": [
|
||||
{
|
||||
"Key": "MyTag2",
|
||||
"Value": "AnotherOne"
|
||||
},
|
||||
{
|
||||
"Key": "MyTag1",
|
||||
"Value": "SomeValue"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -54,13 +54,4 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {
|
||||
"VersioningConfiguration": {
|
||||
"Status": "Enabled"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -48,9 +48,4 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -45,9 +45,4 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 200,
|
||||
"response": "version=\"1.0\" encoding=\"UTF-8\""
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -55,9 +55,4 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 501,
|
||||
"response": "version=\"1.0\" encoding=\"UTF-8\""
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -61,9 +61,4 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -60,9 +60,4 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -29,7 +29,12 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
||||
URL = "storage-155.s3hoster.by";
|
||||
AccessKey = "BRN5RKJE67...";
|
||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||
Region = "BTC";
|
||||
|
||||
Результат = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
```
|
||||
|
||||
|
||||
|
@ -31,7 +31,17 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
||||
URL = "storage-155.s3hoster.by";
|
||||
AccessKey = "BRN5RKJE67...";
|
||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||
Region = "BTC";
|
||||
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
Метод = "PUT";
|
||||
Тело = "C:\test_data\document.docx"; // URL, Путь или Двоичные данные
|
||||
|
||||
Результат = OPI_S3.ОтправитьЗапросСТелом(Метод, ОсновныеДанные, Тело);
|
||||
```
|
||||
|
||||
|
||||
|
@ -27,7 +27,15 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
||||
URL = "storage-155.s3hoster.by" + "/opi-newbucket2";
|
||||
AccessKey = "BRN5RKJE67...";
|
||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||
Region = "BTC";
|
||||
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
Метод = "GET";
|
||||
|
||||
Результат = OPI_S3.ОтправитьЗапросБезТела(Метод, ОсновныеДанные);
|
||||
```
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2103,6 +2103,19 @@ EndProcedure
|
||||
|
||||
#Region S3
|
||||
|
||||
Procedure AWS_CommonMethods() Export
|
||||
|
||||
TestParameters = New Structure;
|
||||
OPI_TestDataRetrieval.ParameterToCollection("S3_AccessKey", TestParameters);
|
||||
OPI_TestDataRetrieval.ParameterToCollection("S3_SecretKey", TestParameters);
|
||||
OPI_TestDataRetrieval.ParameterToCollection("S3_URL" , TestParameters);
|
||||
|
||||
S3_GetBasicDataStructure(TestParameters);
|
||||
S3_SendRequestWithoutBody(TestParameters);
|
||||
S3_SendRequestWithBody(TestParameters);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure AWS_BucketsManagment() Export
|
||||
|
||||
TestParameters = New Structure;
|
||||
@ -14618,6 +14631,61 @@ EndProcedure
|
||||
|
||||
#Region S3
|
||||
|
||||
Procedure S3_GetBasicDataStructure(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["S3_URL"];
|
||||
AccessKey = FunctionParameters["S3_AccessKey"];
|
||||
SecretKey = FunctionParameters["S3_SecretKey"];
|
||||
Region = "BTC";
|
||||
|
||||
Result = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetBasicDataStructure", "S3");
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure S3_SendRequestWithoutBody(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["S3_URL"] + "/opi-newbucket2";
|
||||
AccessKey = FunctionParameters["S3_AccessKey"];
|
||||
SecretKey = FunctionParameters["S3_SecretKey"];
|
||||
Region = "BTC";
|
||||
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
Method = "GET";
|
||||
|
||||
Result = OPI_S3.SendRequestWithoutBody(Method, BasicData);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "SendRequestWithoutBody");
|
||||
OPI_TestDataRetrieval.WriteLogFile("", "SendRequestWithoutBody", "S3", True);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure S3_SendRequestWithBody(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["S3_URL"];
|
||||
AccessKey = FunctionParameters["S3_AccessKey"];
|
||||
SecretKey = FunctionParameters["S3_SecretKey"];
|
||||
Region = "BTC";
|
||||
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
Method = "PUT";
|
||||
Body = "C:\test_data\document.docx"; // URL, Path or Binary Data
|
||||
|
||||
Result = OPI_S3.SendRequestWithBody(Method, BasicData, Body);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "SendRequestWithBody");
|
||||
OPI_TestDataRetrieval.WriteLogFile("", "SendRequestWithBody", "S3", True);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure S3_CreateBucket(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["S3_URL"];
|
||||
@ -14741,7 +14809,7 @@ Procedure S3_GetBucketEncryption(FunctionParameters)
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetBucketEncryption", "S3");
|
||||
OPI_TestDataRetrieval.Check_Map(Result);
|
||||
OPI_TestDataRetrieval.WriteLogFile("", "GetBucketEncryption", "S3");
|
||||
OPI_TestDataRetrieval.WriteLogFile("", "GetBucketEncryption", "S3", True);
|
||||
|
||||
EndProcedure
|
||||
|
||||
@ -14790,7 +14858,7 @@ Procedure S3_PutBucketEncryption(FunctionParameters)
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "PutBucketEncryption", "S3");
|
||||
OPI_TestDataRetrieval.Check_S3NotImplemented(Result);
|
||||
OPI_TestDataRetrieval.WriteLogFile("", "PutBucketEncryption", "S3");
|
||||
OPI_TestDataRetrieval.WriteLogFile("", "PutBucketEncryption", "S3", True);
|
||||
|
||||
EndProcedure
|
||||
|
||||
|
@ -254,6 +254,7 @@ Function GetTestTable() Export
|
||||
NewTest(TestTable, "CdekAPI_CourierInvitationsManagment" , "Courier invitations managment" , Cdek);
|
||||
NewTest(TestTable, "YaMetrika_TagsManagment" , "Tags managment" , Metrika);
|
||||
NewTest(TestTable, "YaMetrika_CountersManagement" , "Counters management" , Metrika);
|
||||
NewTest(TestTable, "AWS_CommonMethods" , "Common methods" , S3_);
|
||||
NewTest(TestTable, "AWS_BucketsManagment" , "Buckets managment" , S3_);
|
||||
|
||||
Return TestTable;
|
||||
@ -443,7 +444,7 @@ Procedure WriteLog(Val Result, Val Method, Val Library = "") Export
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure WriteLogFile(Val Data, Val Method, Val Library) Export
|
||||
Procedure WriteLogFile(Val Data, Val Method, Val Library, Val Forced = False) Export
|
||||
|
||||
Try
|
||||
|
||||
@ -465,7 +466,7 @@ Procedure WriteLogFile(Val Data, Val Method, Val Library) Export
|
||||
FilePath = LibraryLogPath + "/" + Method + ".log";
|
||||
LogFile = New File(FilePath);
|
||||
|
||||
If Not LogFile.Exist() Then
|
||||
If Not LogFile.Exist() Or Forced Then
|
||||
LogDocument = New TextDocument;
|
||||
LogDocument.SetText(Data);
|
||||
LogDocument.Write(FilePath);
|
||||
|
@ -254,6 +254,7 @@ Function GetTestTable() Export
|
||||
NewTest(TestTable, "CdekAPI_CourierInvitationsManagment" , "Courier invitations managment" , Cdek);
|
||||
NewTest(TestTable, "YaMetrika_TagsManagment" , "Tags managment" , Metrika);
|
||||
NewTest(TestTable, "YaMetrika_CountersManagement" , "Counters management" , Metrika);
|
||||
NewTest(TestTable, "AWS_CommonMethods" , "Common methods" , S3_);
|
||||
NewTest(TestTable, "AWS_BucketsManagment" , "Buckets managment" , S3_);
|
||||
|
||||
Return TestTable;
|
||||
@ -443,7 +444,7 @@ Procedure WriteLog(Val Result, Val Method, Val Library = "") Export
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure WriteLogFile(Val Data, Val Method, Val Library) Export
|
||||
Procedure WriteLogFile(Val Data, Val Method, Val Library, Val Forced = False) Export
|
||||
|
||||
Try
|
||||
|
||||
@ -465,7 +466,7 @@ Procedure WriteLogFile(Val Data, Val Method, Val Library) Export
|
||||
FilePath = LibraryLogPath + "/" + Method + ".log";
|
||||
LogFile = New File(FilePath);
|
||||
|
||||
If Not LogFile.Exists() Then
|
||||
If Not LogFile.Exists() Or Forced Then
|
||||
LogDocument = New TextDocument;
|
||||
LogDocument.SetText(Data);
|
||||
LogDocument.Write(FilePath);
|
||||
|
@ -2103,6 +2103,19 @@ EndProcedure
|
||||
|
||||
#Region S3
|
||||
|
||||
Procedure AWS_CommonMethods() Export
|
||||
|
||||
TestParameters = New Structure;
|
||||
OPI_TestDataRetrieval.ParameterToCollection("S3_AccessKey", TestParameters);
|
||||
OPI_TestDataRetrieval.ParameterToCollection("S3_SecretKey", TestParameters);
|
||||
OPI_TestDataRetrieval.ParameterToCollection("S3_URL" , TestParameters);
|
||||
|
||||
S3_GetBasicDataStructure(TestParameters);
|
||||
S3_SendRequestWithoutBody(TestParameters);
|
||||
S3_SendRequestWithBody(TestParameters);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure AWS_BucketsManagment() Export
|
||||
|
||||
TestParameters = New Structure;
|
||||
@ -14618,6 +14631,61 @@ EndProcedure
|
||||
|
||||
#Region S3
|
||||
|
||||
Procedure S3_GetBasicDataStructure(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["S3_URL"];
|
||||
AccessKey = FunctionParameters["S3_AccessKey"];
|
||||
SecretKey = FunctionParameters["S3_SecretKey"];
|
||||
Region = "BTC";
|
||||
|
||||
Result = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetBasicDataStructure", "S3");
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure S3_SendRequestWithoutBody(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["S3_URL"] + "/opi-newbucket2";
|
||||
AccessKey = FunctionParameters["S3_AccessKey"];
|
||||
SecretKey = FunctionParameters["S3_SecretKey"];
|
||||
Region = "BTC";
|
||||
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
Method = "GET";
|
||||
|
||||
Result = OPI_S3.SendRequestWithoutBody(Method, BasicData);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "SendRequestWithoutBody");
|
||||
OPI_TestDataRetrieval.WriteLogFile("", "SendRequestWithoutBody", "S3", True);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure S3_SendRequestWithBody(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["S3_URL"];
|
||||
AccessKey = FunctionParameters["S3_AccessKey"];
|
||||
SecretKey = FunctionParameters["S3_SecretKey"];
|
||||
Region = "BTC";
|
||||
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
Method = "PUT";
|
||||
Body = "C:\test_data\document.docx"; // URL, Path or Binary Data
|
||||
|
||||
Result = OPI_S3.SendRequestWithBody(Method, BasicData, Body);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "SendRequestWithBody");
|
||||
OPI_TestDataRetrieval.WriteLogFile("", "SendRequestWithBody", "S3", True);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure S3_CreateBucket(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["S3_URL"];
|
||||
@ -14741,7 +14809,7 @@ Procedure S3_GetBucketEncryption(FunctionParameters)
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetBucketEncryption", "S3");
|
||||
OPI_TestDataRetrieval.Check_Map(Result);
|
||||
OPI_TestDataRetrieval.WriteLogFile("", "GetBucketEncryption", "S3");
|
||||
OPI_TestDataRetrieval.WriteLogFile("", "GetBucketEncryption", "S3", True);
|
||||
|
||||
EndProcedure
|
||||
|
||||
@ -14790,7 +14858,7 @@ Procedure S3_PutBucketEncryption(FunctionParameters)
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "PutBucketEncryption", "S3");
|
||||
OPI_TestDataRetrieval.Check_S3NotImplemented(Result);
|
||||
OPI_TestDataRetrieval.WriteLogFile("", "PutBucketEncryption", "S3");
|
||||
OPI_TestDataRetrieval.WriteLogFile("", "PutBucketEncryption", "S3", True);
|
||||
|
||||
EndProcedure
|
||||
|
||||
|
@ -2104,16 +2104,16 @@
|
||||
#Область S3
|
||||
|
||||
Процедура AWS_ОбщиеМетоды() Экспорт
|
||||
|
||||
ПараметрыТеста = Новый Структура;
|
||||
|
||||
ПараметрыТеста = Новый Структура;
|
||||
OPI_ПолучениеДанныхТестов.ПараметрВКоллекцию("S3_AccessKey", ПараметрыТеста);
|
||||
OPI_ПолучениеДанныхТестов.ПараметрВКоллекцию("S3_SecretKey", ПараметрыТеста);
|
||||
OPI_ПолучениеДанныхТестов.ПараметрВКоллекцию("S3_URL" , ПараметрыТеста);
|
||||
|
||||
|
||||
S3_ПолучитьСтруктуруДанных(ПараметрыТеста);
|
||||
S3_ОтправитьЗапросБезТела(ПараметрыТеста);
|
||||
S3_ОтправитьЗапросСТелом(ПараметрыТеста);
|
||||
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
Процедура AWS_РаботаСБакетами() Экспорт
|
||||
@ -14632,18 +14632,18 @@
|
||||
#Область S3
|
||||
|
||||
Процедура S3_ПолучитьСтруктуруДанных(ПараметрыФункции)
|
||||
|
||||
URL = ПараметрыФункции["S3_URL"];
|
||||
|
||||
URL = ПараметрыФункции["S3_URL"];
|
||||
AccessKey = ПараметрыФункции["S3_AccessKey"];
|
||||
SecretKey = ПараметрыФункции["S3_SecretKey"];
|
||||
Region = "BTC";
|
||||
|
||||
Результат = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
|
||||
// END
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ПолучитьСтруктуруДанных", "S3");
|
||||
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ПолучитьСтруктуруДанных", "S3");
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
Процедура S3_ОтправитьЗапросБезТела(ПараметрыФункции)
|
||||
@ -14653,16 +14653,16 @@
|
||||
SecretKey = ПараметрыФункции["S3_SecretKey"];
|
||||
Region = "BTC";
|
||||
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
Метод = "GET";
|
||||
|
||||
Результат = OPI_S3.ОтправитьЗапросБезТела(Метод, ОсновныеДанные);
|
||||
|
||||
// END
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОтправитьЗапросБезТела");
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьФайлЛога("", "ОтправитьЗапросБезТела", "S3", Истина);
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОтправитьЗапросБезТела");
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьФайлЛога("", "ОтправитьЗапросБезТела", "S3", Истина);
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
Процедура S3_ОтправитьЗапросСТелом(ПараметрыФункции)
|
||||
@ -14672,8 +14672,8 @@
|
||||
SecretKey = ПараметрыФункции["S3_SecretKey"];
|
||||
Region = "BTC";
|
||||
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
Метод = "PUT";
|
||||
Тело = "C:\test_data\document.docx"; // URL, Путь или Двоичные данные
|
||||
|
||||
@ -14681,9 +14681,9 @@
|
||||
|
||||
// END
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОтправитьЗапросСТелом");
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьФайлЛога("", "ОтправитьЗапросСТелом", "S3", Истина);
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОтправитьЗапросСТелом");
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьФайлЛога("", "ОтправитьЗапросСТелом", "S3", Истина);
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
Процедура S3_СоздатьБакет(ПараметрыФункции)
|
||||
|
@ -2039,9 +2039,9 @@
|
||||
КонецФункции
|
||||
|
||||
Функция ПолучитьОбщийМодуль(Знач Имя)
|
||||
|
||||
|
||||
Модуль = Вычислить(Имя);
|
||||
|
||||
|
||||
Возврат Модуль;
|
||||
КонецФункции
|
||||
|
||||
|
@ -2104,16 +2104,16 @@
|
||||
#Область S3
|
||||
|
||||
Процедура AWS_ОбщиеМетоды() Экспорт
|
||||
|
||||
ПараметрыТеста = Новый Структура;
|
||||
|
||||
ПараметрыТеста = Новый Структура;
|
||||
OPI_ПолучениеДанныхТестов.ПараметрВКоллекцию("S3_AccessKey", ПараметрыТеста);
|
||||
OPI_ПолучениеДанныхТестов.ПараметрВКоллекцию("S3_SecretKey", ПараметрыТеста);
|
||||
OPI_ПолучениеДанныхТестов.ПараметрВКоллекцию("S3_URL" , ПараметрыТеста);
|
||||
|
||||
|
||||
S3_ПолучитьСтруктуруДанных(ПараметрыТеста);
|
||||
S3_ОтправитьЗапросБезТела(ПараметрыТеста);
|
||||
S3_ОтправитьЗапросСТелом(ПараметрыТеста);
|
||||
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
Процедура AWS_РаботаСБакетами() Экспорт
|
||||
@ -14632,18 +14632,18 @@
|
||||
#Область S3
|
||||
|
||||
Процедура S3_ПолучитьСтруктуруДанных(ПараметрыФункции)
|
||||
|
||||
URL = ПараметрыФункции["S3_URL"];
|
||||
|
||||
URL = ПараметрыФункции["S3_URL"];
|
||||
AccessKey = ПараметрыФункции["S3_AccessKey"];
|
||||
SecretKey = ПараметрыФункции["S3_SecretKey"];
|
||||
Region = "BTC";
|
||||
|
||||
Результат = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
|
||||
// END
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ПолучитьСтруктуруДанных", "S3");
|
||||
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ПолучитьСтруктуруДанных", "S3");
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
Процедура S3_ОтправитьЗапросБезТела(ПараметрыФункции)
|
||||
@ -14653,16 +14653,16 @@
|
||||
SecretKey = ПараметрыФункции["S3_SecretKey"];
|
||||
Region = "BTC";
|
||||
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
Метод = "GET";
|
||||
|
||||
Результат = OPI_S3.ОтправитьЗапросБезТела(Метод, ОсновныеДанные);
|
||||
|
||||
// END
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОтправитьЗапросБезТела");
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьФайлЛога("", "ОтправитьЗапросБезТела", "S3", Истина);
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОтправитьЗапросБезТела");
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьФайлЛога("", "ОтправитьЗапросБезТела", "S3", Истина);
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
Процедура S3_ОтправитьЗапросСТелом(ПараметрыФункции)
|
||||
@ -14672,8 +14672,8 @@
|
||||
SecretKey = ПараметрыФункции["S3_SecretKey"];
|
||||
Region = "BTC";
|
||||
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
Метод = "PUT";
|
||||
Тело = "C:\test_data\document.docx"; // URL, Путь или Двоичные данные
|
||||
|
||||
@ -14681,9 +14681,9 @@
|
||||
|
||||
// END
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОтправитьЗапросСТелом");
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьФайлЛога("", "ОтправитьЗапросСТелом", "S3", Истина);
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОтправитьЗапросСТелом");
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьФайлЛога("", "ОтправитьЗапросСТелом", "S3", Истина);
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
Процедура S3_СоздатьБакет(ПараметрыФункции)
|
||||
|
Loading…
x
Reference in New Issue
Block a user