Skip to content

Commit

Permalink
Fixing unit test expected outcome
Browse files Browse the repository at this point in the history
  • Loading branch information
rmurray-r7 committed Nov 20, 2024
1 parent 4b39c6b commit df5cb6c
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion plugins/redis/.CHECKSUM
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"spec": "e7f620b0384a972f398c48517675bb8b",
"spec": "d87af4a73af23e65eb280f06b17501b0",
"manifest": "bcbee882883b3bbc53d23c28bd6b860d",
"setup": "c8ba0398d017459776ab5d8547c2cec8",
"schemas": [
Expand Down
2 changes: 0 additions & 2 deletions plugins/redis/bin/komand_redis
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ def main():
monkey.patch_all()

import insightconnect_plugin_runtime
import sys
sys.path.append(os.path.abspath("../"))
from komand_redis import connection, actions, triggers, tasks

class ICONRedis(insightconnect_plugin_runtime.Plugin):
Expand Down
2 changes: 1 addition & 1 deletion plugins/redis/plugin.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ hub_tags:
keywords: [database, redis]
features: []
version_history:
- "1.0.2 - Bumping requirements.txt | SDK bump to 6.2.0"
- "1.0.2 - Bumping requirements.txt | SDK bump to 6.2.0 | Added Unit Tests"
- "1.0.1 - New spec and help.md format for the Extension Library"
- "1.0.0 - Support web server mode | Add actions HMSET, HMGET and HINCRBY"
- "0.1.2 - Update to new plugin architecture, fix action 'keys'"
Expand Down
5 changes: 3 additions & 2 deletions plugins/redis/unit_test/expected/hmget_exp.json.exp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": {
"login_count": "0"
}
"age": "20",
"name": "Test User"
}
}
13 changes: 6 additions & 7 deletions plugins/redis/unit_test/inputs/hmget.json.exp
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"fields":
[
"name",
"email"
],
"get_all": true,
"key": "user:profile:123"
"fields": [
"age",
"name"
],
"get_all": false,
"key": "user:4567"
}
6 changes: 4 additions & 2 deletions plugins/redis/unit_test/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

sys.path.append(os.path.abspath("../"))
from komand_redis.connection import Connection
from komand_redis.connection.schema import Input


class Util:
@staticmethod
Expand Down Expand Up @@ -34,6 +32,10 @@ def __init__(self):
def delete(key_name: str):
return 10

@staticmethod
def hmget(key_name: str, fields: list):
return [b'20', b'Test User']

@staticmethod
def hgetall(key_name: str):
return {b"age": b"20", b"email": b"[email protected]", b"name": b"Test User"}
Expand Down

0 comments on commit df5cb6c

Please sign in to comment.