Skip to content

Commit

Permalink
chore: PR feedback updates (code cleanup)
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-fiedler committed Feb 9, 2024
1 parent 525c813 commit 5e32747
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion Sources/Amplitude/Types.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public enum StorageKey: String, CaseIterable {
case APP_VERSION = "app_version"
// The version of PersistentStorage, used for data migrations
// Value should be a PersistentStorageVersion value
// Note the first version is 2, which corresponds to instanceName-apiKey based storage
// Note the first version is 2, which corresponds to apiKey-instanceName based storage
case STORAGE_VERSION = "storage_version"
}

Expand Down
6 changes: 0 additions & 6 deletions Tests/AmplitudeTests/AmplitudeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@ final class AmplitudeTests: XCTestCase {
let legacyEventStorage = PersistentStorage(storagePrefix: "storage-\(config.getNormalizeInstanceName())")
let legacyIdentityStorage = PersistentStorage(storagePrefix: "identify-\(config.getNormalizeInstanceName())")

print("Creating legacy Amplitude instance")
// Init Amplitude using legacy storage
let legacyStorageAmplitude = FakeAmplitudeWithNoInstNameOnlyMigration(configuration: Configuration(
apiKey: config.apiKey,
Expand All @@ -366,7 +365,6 @@ final class AmplitudeTests: XCTestCase {
var legacyEventsString = ""
legacyEventFiles?.forEach { file in
legacyEventsString = legacyEventStorage.getEventsString(eventBlock: file) ?? ""
print(legacyEventsString)
}

XCTAssertEqual(legacyEventFiles?.count ?? 0, 1)
Expand All @@ -380,7 +378,6 @@ final class AmplitudeTests: XCTestCase {
var eventsString = ""
eventFiles?.forEach { file in
eventsString = legacyEventStorage.getEventsString(eventBlock: file) ?? ""
print(eventsString)
}

XCTAssertEqual(legacyDeviceId != nil, true)
Expand Down Expand Up @@ -424,7 +421,6 @@ final class AmplitudeTests: XCTestCase {
let legacyEventStorage = FakePersistentStorageAppSandboxEnabled(storagePrefix: "storage-\(config.getNormalizeInstanceName())")
let legacyIdentityStorage = FakePersistentStorageAppSandboxEnabled(storagePrefix: "identify-\(config.getNormalizeInstanceName())")

print("Creating legacy Amplitude instance")
// Init Amplitude using legacy storage
let legacyStorageAmplitude = FakeAmplitudeWithNoInstNameOnlyMigration(configuration: Configuration(
apiKey: config.apiKey,
Expand All @@ -451,7 +447,6 @@ final class AmplitudeTests: XCTestCase {
var legacyEventsString = ""
legacyEventFiles?.forEach { file in
legacyEventsString = legacyEventStorage.getEventsString(eventBlock: file) ?? ""
print(legacyEventsString)
}

XCTAssertEqual(legacyEventFiles?.count ?? 0, 1)
Expand All @@ -465,7 +460,6 @@ final class AmplitudeTests: XCTestCase {
var eventsString = ""
eventFiles?.forEach { file in
eventsString = legacyEventStorage.getEventsString(eventBlock: file) ?? ""
print(eventsString)
}

XCTAssertEqual(legacyDeviceId != nil, true)
Expand Down

0 comments on commit 5e32747

Please sign in to comment.