File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
tests/aws-cpp-sdk-core-tests/aws/auth Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -135,18 +135,19 @@ class SSOCredentialsProviderTrackingTest : public Aws::Testing::AwsCppSdkGTestSu
135135 check.close ();
136136 }
137137
138- void CreateSSOSessionTokenFile (const Aws::String& sessionName /* e.g., "my-sso" */ ) {
138+ void CreateSSOSessionTokenFile (const Aws::String& sessionName) {
139139 const Aws::String hash = Aws::Utils::HashingUtils::HexEncode (
140140 Aws::Utils::HashingUtils::CalculateSHA1 (sessionName));
141141 const Aws::String tokenPath = m_ssoCacheDir + PATH_DELIM + hash + " .json" ;
142142
143143 std::ofstream tokenFile (tokenPath.c_str ());
144144 ASSERT_TRUE (tokenFile.good ()) << " Failed to open " << tokenPath;
145145
146- const auto futureTime = Aws::Utils::DateTime::Now () + std::chrono::hours (1 );
146+ const auto futureTime = Aws::Utils::DateTime::Now ().Millis () + 3600000 ;
147+ const auto futureDateTime = Aws::Utils::DateTime (futureTime);
147148 tokenFile << " {\n "
148149 " \" accessToken\" : \" test-token\" ,\n "
149- " \" expiresAt\" : \" " << futureTime .ToGmtString (Aws::Utils::DateFormat::ISO_8601) << " \"\n "
150+ " \" expiresAt\" : \" " << futureDateTime .ToGmtString (Aws::Utils::DateFormat::ISO_8601) << " \"\n "
150151 // (region/startUrl fields are optional on this path)
151152 " }\n " ;
152153 tokenFile.close ();
You can’t perform that action at this time.
0 commit comments