Skip to content

Commit 5116c72

Browse files
change to use version 1.0 of the sample data (#323)
1 parent 8f8bcb5 commit 5116c72

5 files changed

Lines changed: 13 additions & 23 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ cmake/CPM.cmake
1010
cmake/ios.toolchain.cmake
1111

1212
data/0.95.0/
13+
data/1.0/
1314

1415
### Xcode and Swift ###
1516

Makefile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,17 @@ ifeq ($(OPERATING_SYSTEM),Linux)
5959
endif
6060
ifeq ($(OPERATING_SYSTEM),Windows)
6161
@echo 🏁 WINDOWS INSTALL
62-
choco install wget
63-
choco install unzip
62+
choco upgrade wget -y
63+
choco upgrade unzip -y
64+
choco upgrade cmake -y
6465
endif
65-
wget -O cmake/CPM.cmake https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.35.0/CPM.cmake
66-
wget -O sample-data-container.zip https://github.com/microsoft/electionguard/releases/download/v0.95.0/sample-data.zip
67-
unzip -o sample-data-container.zip
66+
wget -O cmake/CPM.cmake https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.35.5/CPM.cmake
67+
make fetch-sample-data
68+
69+
fetch-sample-data:
70+
@echo ⬇️ FETCH Sample Data
71+
wget -O sample-data-1-0.zip https://github.com/microsoft/electionguard/releases/download/v1.0/sample-data.zip
72+
unzip -o sample-data-1-0.zip
6873

6974

7075
build:

bindings/netstandard/ElectionGuard/ElectionGuard.Encryption.Utils/Generators/Manifest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace ElectionGuard.Encryption.Utils
99
{
1010
public class ManifestGenerator
1111
{
12-
const string TEST_SPEC_VERSION = "0.95.0";
12+
const string TEST_SPEC_VERSION = "1.0";
1313
const string TEST_USE_SAMPLE = "hamilton-general";
1414
// Test data was moved to the solution level and needed to be offset here
1515
const string TEST_OFFSET = @"../../../../../../../..";

test/electionguard/generators/manifest.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ using namespace electionguard;
1212
using namespace std;
1313

1414
#ifndef TEST_SPEC_VERSION
15-
# define TEST_SPEC_VERSION "0.95.0"
15+
# define TEST_SPEC_VERSION "1.0"
1616
#endif
1717

1818
#ifndef TEST_USE_SAMPLE

test/electionguard/test_encrypt.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,6 @@ using namespace electionguard;
1414
using namespace electionguard::tools::generators;
1515
using namespace std;
1616

17-
#ifndef TEST_BALLOT_WITH_WRITEIN_SELECTED
18-
# define TEST_BALLOT_WITH_WRITEIN_SELECTED \
19-
"0.95.0/sample/full/election_private_data/plaintext_ballots/" \
20-
"plaintext_ballot_03a29d15-667c-4ac8-afd7-549f19b8e4eb.json"
21-
#endif
22-
23-
#ifndef TEST_BALLOT_WITH_WRITEIN_NOT_SELECTED
24-
# define TEST_BALLOT_WITH_WRITEIN_NOT_SELECTED \
25-
"0.95.0/sample/full/election_private_data/plaintext_ballots/" \
26-
"plaintext_ballot_ballot-06e7aa04-73fc-11ec-8051-acde48001122.json"
27-
#endif
28-
2917
TEST_CASE("Encrypt simple selection succeeds")
3018
{
3119
// Arrange
@@ -273,10 +261,6 @@ TEST_CASE("Encrypt full PlaintextBallot with WriteIn and Overvote with Encryptio
273261
"\"is_placeholder_selection\": false, \"extended_data\": null}, {\"object_id\":"
274262
" \"write-in-selection\", \"sequence_order\": 3, \"vote\": 1, \"is_placeholder_selection\""
275263
": false, \"write_in\": \"Susan B. Anthony\"}], \"extended_data\": null}]}");
276-
// TODO - Once the relevant plaintext ballot file is in the environment then
277-
// uncomment the below and stop using the hard coded string.
278-
//auto plaintextBallot =
279-
// BallotGenerator::getSimpleBallotFromFile(TEST_BALLOT_WITH_WRITEIN_SELECTED);
280264
auto plaintextBallot = PlaintextBallot::fromJson(plaintextBallot_json);
281265
auto ciphertext = mediator->encrypt(*plaintextBallot);
282266

0 commit comments

Comments
 (0)