Browse Source

Fix: comments and test case

Rod Hynes 8 years ago
parent
commit
b8c6fe5db2
2 changed files with 5 additions and 4 deletions
  1. 1 2
      psiphon/common/osl/osl.go
  2. 4 2
      psiphon/remoteServerList_test.go

+ 1 - 2
psiphon/common/osl/osl.go

@@ -125,7 +125,6 @@ type Scheme struct {
 	// sufficiently seeded. And so on. The first level in the list is the
 	// lowest level. The time period for OSLs is determined by the totals in
 	// the KeySplits.
-	// Limitation: thresholds must be at least 2.
 	//
 	// Example:
 	//
@@ -278,7 +277,7 @@ func NewConfig(filename string) (*Config, error) {
 	return config, nil
 }
 
-// LoadConfig loads, vaildates, and initializes a JSON encoded OSL
+// LoadConfig loads, validates, and initializes a JSON encoded OSL
 // configuration.
 func LoadConfig(configJSON []byte) (*Config, error) {
 

+ 4 - 2
psiphon/remoteServerList_test.go

@@ -163,12 +163,12 @@ func testObfuscatedRemoteServerLists(t *testing.T, omitMD5Sums bool) {
 	if omitMD5Sums {
 		omitMD5SumsSchemes = []int{0}
 	}
-	omitEmptyOSLsSchemes := []int{0}
-
 	// First Pave() call is to get the OSL ID to pave into
 
 	oslID := ""
 
+	omitEmptyOSLsSchemes := []int{}
+
 	paveFiles, err := oslConfig.Pave(
 		epoch,
 		propagationChannelID,
@@ -184,6 +184,8 @@ func testObfuscatedRemoteServerLists(t *testing.T, omitMD5Sums bool) {
 		t.Fatalf("error paving OSL files: %s", err)
 	}
 
+	omitEmptyOSLsSchemes = []int{0}
+
 	paveFiles, err = oslConfig.Pave(
 		epoch,
 		propagationChannelID,