-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove invalid dependencies from microsoft-azure-storage-blob (#39050)
Remove invalid dependencies from microsoft-azure-storage-blob
- Loading branch information
1 parent
6daa36b
commit 03c064c
Showing
4 changed files
with
46 additions
and
19 deletions.
There are no files selected for viewing
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
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
18 changes: 18 additions & 0 deletions
18
...rage/microsoft-azure-storage-blob/src/test/java/com/microsoft/azure/storage/LiveOnly.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
package com.microsoft.azure.storage; | ||
|
||
import org.spockframework.runtime.extension.ExtensionAnnotation; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Inherited; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
@Inherited | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target({ElementType.TYPE, ElementType.METHOD}) | ||
@ExtensionAnnotation(LiveOnlyExtension.class) | ||
public @interface LiveOnly { | ||
} |
26 changes: 26 additions & 0 deletions
26
...osoft-azure-storage-blob/src/test/java/com/microsoft/azure/storage/LiveOnlyExtension.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
package com.microsoft.azure.storage; | ||
|
||
import org.spockframework.runtime.extension.IAnnotationDrivenExtension; | ||
import org.spockframework.runtime.model.FeatureInfo; | ||
import org.spockframework.runtime.model.SpecInfo; | ||
|
||
public class LiveOnlyExtension implements IAnnotationDrivenExtension<LiveOnly> { | ||
|
||
@Override | ||
public void visitFeatureAnnotation(LiveOnly annotation, FeatureInfo feature) { | ||
String testMode = (String) APISpec.getTestMode(); | ||
if (!"LIVE".equalsIgnoreCase(testMode)) { | ||
feature.skip(String.format("Test ignored in %s mode", testMode)); | ||
} | ||
} | ||
|
||
@Override | ||
public void visitSpecAnnotation(LiveOnly annotation, SpecInfo spec) { | ||
String testMode = (String) APISpec.getTestMode(); | ||
if (!"LIVE".equalsIgnoreCase(testMode)) { | ||
spec.skip(String.format("Test ignored in %s mode", testMode)); | ||
} | ||
} | ||
} |