diff --git a/tools/pasture/scenarios/instance.sh b/tools/pasture/scenarios/instance.sh index 0540f35..65cb883 100644 --- a/tools/pasture/scenarios/instance.sh +++ b/tools/pasture/scenarios/instance.sh @@ -207,9 +207,10 @@ missing=$(echo "$log" | j " seen={i['action'] for i in d['items']} print(' '.join(sorted({'root.promote','settings.update','rule.insert','rule.update','rule.delete','domain_block.insert','domain_block.delete','report.resolve','announcement.insert','announcement.update','announcement.delete','settings.thumbnail','relay.insert','relay.delete'} - seen)))") [ -z "$missing" ] && [ -n "$log" ] && ok "it lists every act of the scenario" || ko "the log misses: $missing" -[ "$(echo "$log" | j "print(all(i.get('by') in ('$ROOT_USER', 'cli') for i in d['items']))")" = True ] \ +# an act on one of the acting login's own personas names nobody (R6), and the pasture's personas are all the root's +[ "$(echo "$log" | j "print(all(i.get('by') in ('$ROOT_USER', 'cli', None) for i in d['items']))")" = True ] \ && [ "$(echo "$log" | j "print(any(i['action'] == 'root.promote' and i.get('by') == 'cli' for i in d['items']))")" = True ] \ - && ok "each by the administrator's login, or the command line's" || ko "the log names someone else" + && ok "each by the administrator's login, the command line's, or nobody's" || ko "the log names someone else: $(echo "$log" | j "print(sorted({str(i.get('by')) for i in d['items']}))")" echo "$log" | grep -qE '127\.0\.0\.1|11\.42\.|::1' && ko "the log holds an address" || ok "and holds no address" page=$(api "$ADMIN" GET "/clientapi/moderator/log?limit=2") next=$(echo "$page" | j "print(d['next'])")