This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Unroll("For currency #ccy and amount = #sum response will be #response_code - #response_text") | |
def "Check max and min sum for different currencies"() { | |
given: "Body for request with sum and currency" | |
String content = TestProperties.getRestBody(ccy, sum) | |
when: "Send request" | |
Response result = Request.send(RequestType.PUT, url, content); | |
then: "Check response" | |
result.status.contains(http) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import httplib | |
import argparse | |
import datetime | |
import random | |
import string | |
def tomorrow(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
sys.setrecursionlimit(20000) | |
data = [1, 4, 5, 22, 34, 55] | |
def search(start, end, value): | |
pivot = start + (end - start) / 2 | |
if data[pivot] == value: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Base64; | |
import javax.crypto.Mac; | |
import javax.crypto.spec.SecretKeySpec; | |
public class Hmac { | |
private static String data = "2.00|5101603|RUB|bill|test-checking-one-way-response-from-processing|0|белый тест|paid|tel:+79167421378"; | |
private static String key = "123456789"; | |
public static void main(String[] args){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func uploadFile(url string) int { | |
file, err := os.Open(*appPath) | |
if err != nil { | |
log.Fatal("Failed to get file for upload because of: ", err.Error()) | |
} | |
client := &http.Client{} | |
request, err := http.NewRequest("PUT", url, file) | |
if err != nil { | |
log.Fatal("Failed to create HTTP request because of: ", err.Error()) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"os" | |
"regexp" | |
"strings" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"os": "MacOS", | |
"version": "10.12.4", | |
"package": [ | |
"com.apple.pkg.AppExceptions.14U2177" | |
] | |
} | |
{ | |
"result": "ERROR", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"result": "OK", | |
"data": { | |
"packages": { | |
"openssl 0.9x-1+deb8u5 amd64": { | |
"DSA-3287": [ | |
{ | |
"package": "openssl 0.9x-1+deb8u5 amd64", | |
"providedVersion": "0.9x-1+deb8u5", | |
"bulletinVersion": "1.0.1e-2+deb7u17", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-server | |
-Xms2048m | |
-Xmx2048m | |
-XX:NewSize=512m | |
-XX:MaxNewSize=512m | |
-XX:PermSize=512m | |
-XX:MaxPermSize=512m | |
-XX:+UseParNewGC | |
-XX:ParallelGCThreads=4 | |
-XX:MaxTenuringThreshold=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func sendRequest(url string, file *io.Reader, info os.FileInfo) *http.Response { | |
client := &http.Client{ | |
Timeout: 10 * time.Minute, | |
} | |
request, err := http.NewRequest("PUT", url, *file) | |
errors.Validate(err, "Failed to create HTTP request") | |
request.Header.Add("Content-Type", "application/octet-stream") | |
request.ContentLength = info.Size() | |
resp, err := client.Do(request) | |
errors.Validate(err, "Failed to upload file by S3 link") |
OlderNewer