def testFormatGcsUrl_CloudConsoleUrl(self): self.assertEquals("gs://kokoro-ct4e-release/prod/google-cloud-eclipse/ubuntu/jar_signing/21/20180323-101656", _FormatGcsUrl("https://console.cloud.google.com/storage/browser/kokoro-ct4e-release/prod/google-cloud-eclipse/ubuntu/jar_signing/21/20180323-101656"))
def testFormatGcsUrl_InvalidTimestamp(self): self.assertFalse(_FormatGcsUrl("kokoro-ct4e-release/prod/google-cloud-eclipse/ubuntu/jar_signing/34/timestamp"))
def testFormatGcsUrl_GcslUrl(self): self.assertEquals("gs://kokoro-ct4e-release/prod/google-cloud-eclipse/ubuntu/jar_signing/13/20180322-160751", _FormatGcsUrl("gs://kokoro-ct4e-release/prod/google-cloud-eclipse/ubuntu/jar_signing/13/20180322-160751"))
def testFormatGcsUrl_TrailingSlash(self): self.assertFalse(_FormatGcsUrl("kokoro-ct4e-release/prod/google-cloud-eclipse/ubuntu/jar_signing/34/20180323-215548/"))
def testFormatGcsUrl_InvalidJobNumber(self): self.assertFalse(_FormatGcsUrl("kokoro-ct4e-release/prod/google-cloud-eclipse/ubuntu/jar_signing/number/20180323-215548"))
def testFormatGcsUrl_WrongInput(self): self.assertFalse(_FormatGcsUrl("invalid URL"))
def testFormatGcsUrl_MinimalUrl(self): self.assertEquals("gs://kokoro-ct4e-release/prod/google-cloud-eclipse/ubuntu/jar_signing/34/20180323-215548", _FormatGcsUrl("kokoro-ct4e-release/prod/google-cloud-eclipse/ubuntu/jar_signing/34/20180323-215548"))
def testFormatGcsUrl_GcslUrl(self): self.assertEquals( "gs://kokoro-ct4e-release/prod/google-cloud-eclipse/ubuntu/jar_signing/13/20180322-160751", _FormatGcsUrl( "gs://kokoro-ct4e-release/prod/google-cloud-eclipse/ubuntu/jar_signing/13/20180322-160751" ))
def testFormatGcsUrl_CloudConsoleUrl(self): self.assertEquals( "gs://kokoro-ct4e-release/prod/google-cloud-eclipse/ubuntu/jar_signing/21/20180323-101656", _FormatGcsUrl( "https://console.cloud.google.com/storage/browser/kokoro-ct4e-release/prod/google-cloud-eclipse/ubuntu/jar_signing/21/20180323-101656" ))
def testFormatGcsUrl_InvalidTimestamp(self): self.assertFalse( _FormatGcsUrl( "kokoro-ct4e-release/prod/google-cloud-eclipse/ubuntu/jar_signing/34/timestamp" ))
def testFormatGcsUrl_InvalidJobNumber(self): self.assertFalse( _FormatGcsUrl( "kokoro-ct4e-release/prod/google-cloud-eclipse/ubuntu/jar_signing/number/20180323-215548" ))
def testFormatGcsUrl_TrailingSlash(self): self.assertFalse( _FormatGcsUrl( "kokoro-ct4e-release/prod/google-cloud-eclipse/ubuntu/jar_signing/34/20180323-215548/" ))
def testFormatGcsUrl_MinimalUrl(self): self.assertEquals( "gs://kokoro-ct4e-release/prod/google-cloud-eclipse/ubuntu/jar_signing/34/20180323-215548", _FormatGcsUrl( "kokoro-ct4e-release/prod/google-cloud-eclipse/ubuntu/jar_signing/34/20180323-215548" ))