You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2026-05-22 10:05:29 +02:00
Main build (Jenkins)
This commit is contained in:
@@ -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: Работа с бакетами
|
- name: Работа с бакетами
|
||||||
if: ${{ cancelled() }} == false
|
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_РаботаСБакетами"
|
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 {
|
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') {
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
powershell encoding: 'UTF-8', script:'1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_AWS_РаботаСБакетами"'
|
powershell encoding: 'UTF-8', script:'1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_AWS_РаботаСБакетами"'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -641,6 +641,10 @@ pipeline {
|
|||||||
steps {
|
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') {
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
powershell encoding: 'UTF-8', script:'1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "AWS_РаботаСБакетами"'
|
powershell encoding: 'UTF-8', script:'1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "AWS_РаботаСБакетами"'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"URL": "storage-155.s3hoster.by",
|
||||||
|
"AccessKey": "BRN5RKJE67...",
|
||||||
|
"SecretKey": "NNhv+i9PrytpT8Tu0C1N..."
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"URL": "storage-155.s3hoster.by",
|
||||||
|
"AccessKey": "BRN5RKJE67...",
|
||||||
|
"SecretKey": "NNhv+i9PrytpT8Tu0C1N..."
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"URL": "storage-155.s3hoster.by",
|
||||||
|
"AccessKey": "BRN5RKJE67...",
|
||||||
|
"SecretKey": "NNhv+i9PrytpT8Tu0C1N..."
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
URL = "storage-155.s3hoster.by";
|
||||||
|
AccessKey = "BRN5RKJE67...";
|
||||||
|
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||||
|
Region = "BTC";
|
||||||
|
|
||||||
|
Result = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||||
@@ -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);
|
||||||
@@ -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"
|
```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"
|
```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"
|
```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);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"URL": "storage-155.s3hoster.by",
|
||||||
|
"AccessKey": "BRN5RKJE67...",
|
||||||
|
"SecretKey": "NNhv+i9PrytpT8Tu0C1N..."
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"URL": "storage-155.s3hoster.by",
|
||||||
|
"AccessKey": "BRN5RKJE67...",
|
||||||
|
"SecretKey": "NNhv+i9PrytpT8Tu0C1N..."
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"URL": "storage-155.s3hoster.by",
|
||||||
|
"AccessKey": "BRN5RKJE67...",
|
||||||
|
"SecretKey": "NNhv+i9PrytpT8Tu0C1N..."
|
||||||
|
}
|
||||||
@@ -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.ОтправитьЗапросБезТела(Метод, ОсновныеДанные);
|
||||||
@@ -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.ОтправитьЗапросСТелом(Метод, ОсновныеДанные, Тело);
|
||||||
@@ -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"
|
```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"
|
```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"
|
```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.ОтправитьЗапросБезТела(Метод, ОсновныеДанные);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+5604
-5604
File diff suppressed because it is too large
Load Diff
@@ -2103,6 +2103,19 @@ EndProcedure
|
|||||||
|
|
||||||
#Region S3
|
#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
|
Procedure AWS_BucketsManagment() Export
|
||||||
|
|
||||||
TestParameters = New Structure;
|
TestParameters = New Structure;
|
||||||
@@ -14618,6 +14631,61 @@ EndProcedure
|
|||||||
|
|
||||||
#Region S3
|
#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)
|
Procedure S3_CreateBucket(FunctionParameters)
|
||||||
|
|
||||||
URL = FunctionParameters["S3_URL"];
|
URL = FunctionParameters["S3_URL"];
|
||||||
@@ -14741,7 +14809,7 @@ Procedure S3_GetBucketEncryption(FunctionParameters)
|
|||||||
|
|
||||||
OPI_TestDataRetrieval.WriteLog(Result, "GetBucketEncryption", "S3");
|
OPI_TestDataRetrieval.WriteLog(Result, "GetBucketEncryption", "S3");
|
||||||
OPI_TestDataRetrieval.Check_Map(Result);
|
OPI_TestDataRetrieval.Check_Map(Result);
|
||||||
OPI_TestDataRetrieval.WriteLogFile("", "GetBucketEncryption", "S3");
|
OPI_TestDataRetrieval.WriteLogFile("", "GetBucketEncryption", "S3", True);
|
||||||
|
|
||||||
EndProcedure
|
EndProcedure
|
||||||
|
|
||||||
@@ -14790,7 +14858,7 @@ Procedure S3_PutBucketEncryption(FunctionParameters)
|
|||||||
|
|
||||||
OPI_TestDataRetrieval.WriteLog(Result, "PutBucketEncryption", "S3");
|
OPI_TestDataRetrieval.WriteLog(Result, "PutBucketEncryption", "S3");
|
||||||
OPI_TestDataRetrieval.Check_S3NotImplemented(Result);
|
OPI_TestDataRetrieval.Check_S3NotImplemented(Result);
|
||||||
OPI_TestDataRetrieval.WriteLogFile("", "PutBucketEncryption", "S3");
|
OPI_TestDataRetrieval.WriteLogFile("", "PutBucketEncryption", "S3", True);
|
||||||
|
|
||||||
EndProcedure
|
EndProcedure
|
||||||
|
|
||||||
|
|||||||
@@ -254,6 +254,7 @@ Function GetTestTable() Export
|
|||||||
NewTest(TestTable, "CdekAPI_CourierInvitationsManagment" , "Courier invitations managment" , Cdek);
|
NewTest(TestTable, "CdekAPI_CourierInvitationsManagment" , "Courier invitations managment" , Cdek);
|
||||||
NewTest(TestTable, "YaMetrika_TagsManagment" , "Tags managment" , Metrika);
|
NewTest(TestTable, "YaMetrika_TagsManagment" , "Tags managment" , Metrika);
|
||||||
NewTest(TestTable, "YaMetrika_CountersManagement" , "Counters management" , Metrika);
|
NewTest(TestTable, "YaMetrika_CountersManagement" , "Counters management" , Metrika);
|
||||||
|
NewTest(TestTable, "AWS_CommonMethods" , "Common methods" , S3_);
|
||||||
NewTest(TestTable, "AWS_BucketsManagment" , "Buckets managment" , S3_);
|
NewTest(TestTable, "AWS_BucketsManagment" , "Buckets managment" , S3_);
|
||||||
|
|
||||||
Return TestTable;
|
Return TestTable;
|
||||||
@@ -443,7 +444,7 @@ Procedure WriteLog(Val Result, Val Method, Val Library = "") Export
|
|||||||
|
|
||||||
EndProcedure
|
EndProcedure
|
||||||
|
|
||||||
Procedure WriteLogFile(Val Data, Val Method, Val Library) Export
|
Procedure WriteLogFile(Val Data, Val Method, Val Library, Val Forced = False) Export
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|
||||||
@@ -465,7 +466,7 @@ Procedure WriteLogFile(Val Data, Val Method, Val Library) Export
|
|||||||
FilePath = LibraryLogPath + "/" + Method + ".log";
|
FilePath = LibraryLogPath + "/" + Method + ".log";
|
||||||
LogFile = New File(FilePath);
|
LogFile = New File(FilePath);
|
||||||
|
|
||||||
If Not LogFile.Exist() Then
|
If Not LogFile.Exist() Or Forced Then
|
||||||
LogDocument = New TextDocument;
|
LogDocument = New TextDocument;
|
||||||
LogDocument.SetText(Data);
|
LogDocument.SetText(Data);
|
||||||
LogDocument.Write(FilePath);
|
LogDocument.Write(FilePath);
|
||||||
|
|||||||
@@ -254,6 +254,7 @@ Function GetTestTable() Export
|
|||||||
NewTest(TestTable, "CdekAPI_CourierInvitationsManagment" , "Courier invitations managment" , Cdek);
|
NewTest(TestTable, "CdekAPI_CourierInvitationsManagment" , "Courier invitations managment" , Cdek);
|
||||||
NewTest(TestTable, "YaMetrika_TagsManagment" , "Tags managment" , Metrika);
|
NewTest(TestTable, "YaMetrika_TagsManagment" , "Tags managment" , Metrika);
|
||||||
NewTest(TestTable, "YaMetrika_CountersManagement" , "Counters management" , Metrika);
|
NewTest(TestTable, "YaMetrika_CountersManagement" , "Counters management" , Metrika);
|
||||||
|
NewTest(TestTable, "AWS_CommonMethods" , "Common methods" , S3_);
|
||||||
NewTest(TestTable, "AWS_BucketsManagment" , "Buckets managment" , S3_);
|
NewTest(TestTable, "AWS_BucketsManagment" , "Buckets managment" , S3_);
|
||||||
|
|
||||||
Return TestTable;
|
Return TestTable;
|
||||||
@@ -443,7 +444,7 @@ Procedure WriteLog(Val Result, Val Method, Val Library = "") Export
|
|||||||
|
|
||||||
EndProcedure
|
EndProcedure
|
||||||
|
|
||||||
Procedure WriteLogFile(Val Data, Val Method, Val Library) Export
|
Procedure WriteLogFile(Val Data, Val Method, Val Library, Val Forced = False) Export
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|
||||||
@@ -465,7 +466,7 @@ Procedure WriteLogFile(Val Data, Val Method, Val Library) Export
|
|||||||
FilePath = LibraryLogPath + "/" + Method + ".log";
|
FilePath = LibraryLogPath + "/" + Method + ".log";
|
||||||
LogFile = New File(FilePath);
|
LogFile = New File(FilePath);
|
||||||
|
|
||||||
If Not LogFile.Exists() Then
|
If Not LogFile.Exists() Or Forced Then
|
||||||
LogDocument = New TextDocument;
|
LogDocument = New TextDocument;
|
||||||
LogDocument.SetText(Data);
|
LogDocument.SetText(Data);
|
||||||
LogDocument.Write(FilePath);
|
LogDocument.Write(FilePath);
|
||||||
|
|||||||
@@ -2103,6 +2103,19 @@ EndProcedure
|
|||||||
|
|
||||||
#Region S3
|
#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
|
Procedure AWS_BucketsManagment() Export
|
||||||
|
|
||||||
TestParameters = New Structure;
|
TestParameters = New Structure;
|
||||||
@@ -14618,6 +14631,61 @@ EndProcedure
|
|||||||
|
|
||||||
#Region S3
|
#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)
|
Procedure S3_CreateBucket(FunctionParameters)
|
||||||
|
|
||||||
URL = FunctionParameters["S3_URL"];
|
URL = FunctionParameters["S3_URL"];
|
||||||
@@ -14741,7 +14809,7 @@ Procedure S3_GetBucketEncryption(FunctionParameters)
|
|||||||
|
|
||||||
OPI_TestDataRetrieval.WriteLog(Result, "GetBucketEncryption", "S3");
|
OPI_TestDataRetrieval.WriteLog(Result, "GetBucketEncryption", "S3");
|
||||||
OPI_TestDataRetrieval.Check_Map(Result);
|
OPI_TestDataRetrieval.Check_Map(Result);
|
||||||
OPI_TestDataRetrieval.WriteLogFile("", "GetBucketEncryption", "S3");
|
OPI_TestDataRetrieval.WriteLogFile("", "GetBucketEncryption", "S3", True);
|
||||||
|
|
||||||
EndProcedure
|
EndProcedure
|
||||||
|
|
||||||
@@ -14790,7 +14858,7 @@ Procedure S3_PutBucketEncryption(FunctionParameters)
|
|||||||
|
|
||||||
OPI_TestDataRetrieval.WriteLog(Result, "PutBucketEncryption", "S3");
|
OPI_TestDataRetrieval.WriteLog(Result, "PutBucketEncryption", "S3");
|
||||||
OPI_TestDataRetrieval.Check_S3NotImplemented(Result);
|
OPI_TestDataRetrieval.Check_S3NotImplemented(Result);
|
||||||
OPI_TestDataRetrieval.WriteLogFile("", "PutBucketEncryption", "S3");
|
OPI_TestDataRetrieval.WriteLogFile("", "PutBucketEncryption", "S3", True);
|
||||||
|
|
||||||
EndProcedure
|
EndProcedure
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user