def step_impl(context, chaincodeName, functionName, containerAlias, times): assert 'chaincodeSpec' in context, "chaincodeSpec not found in context" resp = bdd_request_util.httpGetToContainerAlias(context, containerAlias, "/chain") context.chainheight = getAttributeFromJSON("height", resp.json()) context.txcount = times for i in range(int(times)): invokeChaincode(context, "invoke", functionName, containerAlias)
def step_impl(context, containerAlias): assert 'table' in context, "table (of query parameters) not found in context" assert 'userName' in context, "userName not found in context" assert 'compose_containers' in context, "compose_containers not found in context" queryParams = {} for row in context.table.rows: key, value = row['key'], row['value'] queryParams[key] = value endpoint = "/registrar/{0}/tcert".format(context.userName) context.response = httpGetToContainerAlias(context, containerAlias, endpoint)
def step_impl(context, path, containerAlias): context.response = bdd_request_util.httpGetToContainerAlias(context, \ containerAlias, path)