Skip to content

Commit

Permalink
Merge pull request #313 from DataDog/nachoBonafonte/update-to-0.3.0-t…
Browse files Browse the repository at this point in the history
…esting-sdk

Update to 0.3.0 version of testing sdk
  • Loading branch information
Ignacio Bonafonte authored Nov 20, 2020
2 parents 819131e + 13bf7c9 commit f119262
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 7 deletions.
8 changes: 5 additions & 3 deletions Datadog/Datadog.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,7 @@
9EFD112B24B32D29003A1A2B /* FirstPartyURLsFilter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstPartyURLsFilter.swift; sourceTree = "<group>"; };
E132727A24B333C700952F8B /* TracingBenchmarkTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TracingBenchmarkTests.swift; sourceTree = "<group>"; };
E132727C24B35B5F00952F8B /* TracingStorageBenchmarkTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TracingStorageBenchmarkTests.swift; sourceTree = "<group>"; };
E1B082CB25641DF9002DB9D2 /* Example.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Example.xcconfig; sourceTree = "<group>"; };
E1D202E924C065CF00D1AF3A /* ActiveSpansPool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActiveSpansPool.swift; sourceTree = "<group>"; };
E1D203FB24C1884500D1AF3A /* ActiveSpansPoolTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActiveSpansPoolTests.swift; sourceTree = "<group>"; };
E1D5AEA624B4D45A007F194B /* Versioning.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Versioning.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1534,6 +1535,7 @@
isa = PBXGroup;
children = (
61441C1224616DEC003D8BB8 /* Info.plist */,
E1B082CB25641DF9002DB9D2 /* Example.xcconfig */,
6167ACBD251A0B410012B4D0 /* Example-Bridging-Header.h */,
);
path = Example;
Expand Down Expand Up @@ -3122,7 +3124,7 @@
};
61441C1424616DEC003D8BB8 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 615519252461BCE7002A85CF /* Datadog.xcconfig */;
baseConfigurationReference = E1B082CB25641DF9002DB9D2 /* Example.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
Expand All @@ -3143,7 +3145,7 @@
};
61441C1524616DEC003D8BB8 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 615519252461BCE7002A85CF /* Datadog.xcconfig */;
baseConfigurationReference = E1B082CB25641DF9002DB9D2 /* Example.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
Expand All @@ -3162,7 +3164,7 @@
};
61441C1624616DEC003D8BB8 /* Integration */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 615519252461BCE7002A85CF /* Datadog.xcconfig */;
baseConfigurationReference = E1B082CB25641DF9002DB9D2 /* Example.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,18 @@
<EnvironmentVariable
key = "DD_DISABLE_NETWORK_INSTRUMENTATION"
value = "1"
isEnabled = "YES">
isEnabled = "NO">
</EnvironmentVariable>
<EnvironmentVariable
key = "DD_DISABLE_HEADERS_INJECTION"
value = "1"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "DD_ENABLE_RECORD_PAYLOAD"
value = "1"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "GIT_REPOSITORY_URL"
value = "$(GIT_REPOSITORY_URL)"
Expand Down
5 changes: 5 additions & 0 deletions Datadog/TargetSupport/Example/Example.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Add common settings from Datadog.xcconfig
#include "../xcconfigs/Datadog.xcconfig"

// Add DatadogSDKTesting instrumentation (if available in current environment)
#include "../xcconfigs/DatadogSDKTesting.local.xcconfig"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tools:
@echo "OK 👌"

# The release version of `dd-sdk-swift-testing` to use for tests instrumentation.
DD_SDK_SWIFT_TESTING_VERSION = 0.2.0
DD_SDK_SWIFT_TESTING_VERSION = 0.3.0

define DD_SDK_TESTING_XCCONFIG_CI
FRAMEWORK_SEARCH_PATHS=$$(inherited) $$(SRCROOT)/../instrumented-tests/\n
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,12 @@ class RUMResourcesScenarioTests: IntegrationTests, RUMCommonAsserts, TracingComm
)
XCTAssertEqual(firstPartyResource1.resource.method, .methodGET)
XCTAssertGreaterThan(firstPartyResource1.resource.duration, 0)
XCTAssertNil(firstPartyResource1.dd.traceID, "`firstPartyGETResourceURL` should not be traced")
XCTAssertNil(firstPartyResource1.dd.spanID, "`firstPartyGETResourceURL` should not be traced")

//TEMPORARY workaround for dd-sdk-testing
if ProcessInfo.processInfo.environment["DD_TEST_RUNNER"] == nil {
XCTAssertNil(firstPartyResource1.dd.traceID, "`firstPartyGETResourceURL` should not be traced")
XCTAssertNil(firstPartyResource1.dd.spanID, "`firstPartyGETResourceURL` should not be traced")
}

let firstPartyResource2 = try XCTUnwrap(
session.viewVisits[0].resourceEvents.first { $0.resource.url == firstPartyPOSTResourceURL.absoluteString },
Expand Down

0 comments on commit f119262

Please sign in to comment.