Skip to content
This repository has been archived by the owner on Apr 5, 2020. It is now read-only.

Commit

Permalink
add tests for linux circle ci
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinM authored and JustinM committed Sep 8, 2017
1 parent a11db25 commit c6bb5b8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import XCTest

XCTMain([
testCase(AWSTestSuite.allTests),
testCase(S3Tests.allTests)
testCase(S3Tests.allTests),
testCase(S3SignerAWSTests.allTests)
])
18 changes: 12 additions & 6 deletions Tests/S3SignerAWSTests/S3SignerAWSTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ import XCTest

class S3SignerAWSTests: XCTestCase {

override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
static var allTests = [
("test_TimeFromNow_Expiration", test_TimeFromNow_Expiration),
("test_Payload_bytes", test_Payload_bytes),
("test_Payload_none", test_Payload_none),
("test_Payload_unsigned", test_Payload_unsigned),
("test_Dates_formatting", test_Dates_formatting),
("test_Region_host", test_Region_host),
("test_S3Signer_get_dates", test_S3Signer_get_dates),
("test_S3Signer_service", test_S3Signer_service)
]

func test_TimeFromNow_Expiration() {
let thiryMinutes = TimeFromNow.thirtyMinutes
Expand Down Expand Up @@ -46,7 +52,7 @@ class S3SignerAWSTests: XCTestCase {
XCTAssertEqual(unsigned, try! payloadUnsigned.hashed())
}

func test_Dates_Formatting() {
func test_Dates_formatting() {
let date = Date()
let dates = Dates(date: date)
XCTAssertEqual(dates.short, date.timestampShort)
Expand All @@ -68,7 +74,7 @@ class S3SignerAWSTests: XCTestCase {
XCTAssertEqual(Region.saEast1.host, "s3-sa-east-1.amazonaws.com")
}

func test_S3Signer_Get_dates() {
func test_S3Signer_get_dates() {
let signer = S3SignerAWS(accessKey: "ACCESSKEY", secretKey: "SECRETKEY", region: Region.usEast1_Virginia)
let date = Date()
let dates = signer.getDates(date: date)
Expand Down

0 comments on commit c6bb5b8

Please sign in to comment.