mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-20 16:46:14 +00:00
confserver: In protocol V2, a "load" should only send back changes not all items
This commit is contained in:

committed by
Angus Gratton

parent
90ddbaac16
commit
ec4c75b692
@@ -64,11 +64,6 @@ def main():
|
||||
|
||||
test_load_save(p, temp_sdkconfig_path)
|
||||
|
||||
p.send("%s\n" % json.dumps({"version": 2, "load": temp_sdkconfig_path}))
|
||||
load_result = expect_json(p)
|
||||
print("Load result: %s" % (json.dumps(load_result)))
|
||||
assert len(load_result["values"]) > 0 # loading same file should return all config items
|
||||
assert len(load_result["ranges"]) > 0
|
||||
print("Done. All passed.")
|
||||
|
||||
finally:
|
||||
@@ -133,6 +128,13 @@ def test_load_save(p, temp_sdkconfig_path):
|
||||
after = os.stat(temp_sdkconfig_path).st_mtime
|
||||
assert after > before # something got written to disk
|
||||
|
||||
# Do a V2 load
|
||||
load_result = send_request(p, {"version": 2, "load": temp_sdkconfig_path})
|
||||
print("V2 Load result: %s" % (json.dumps(load_result)))
|
||||
assert "error" not in load_result
|
||||
assert len(load_result["values"]) == 0 # in V2, loading same file should return no config items
|
||||
assert len(load_result["ranges"]) == 0
|
||||
|
||||
# Do a V1 load
|
||||
load_result = send_request(p, {"version": 1, "load": temp_sdkconfig_path})
|
||||
print("V1 Load result: %s" % (json.dumps(load_result)))
|
||||
|
Reference in New Issue
Block a user